# Fix query.failed

query.failed
Recorded exits: 1 (failed). [1]

docs_rev: 6fd264d5335b1cda
applies_to: source at 4aca9a8; agc >=0.3.0
verified: 4aca9a8
Generated from: fix/query.failed, data/mirror-db-tools, data/reading-production-safely, reference/error-code-catalog

## Steps

Cause: Postgres rejected the SQL on the mirror; `message` is its error
Next action: Fix the SQL
[2]

Cause: `db query`
Next action: ‹e› | Fix the SQL and run it again. | commands/db.ts:181
[4]

## Errors

See the cited canonical pages for errors.

## Not available yet

Availability follows the cited sources; this answer does not establish additional capabilities.

## Sources

[1] [fix/query.failed — Reference](/docs/fix/query.failed.md#reference) (shipped; source at 4aca9a8; 4aca9a8)
[2] [data/mirror-db-tools — Errors](/docs/data/mirror-db-tools.md#errors) (shipped; agc >=0.3.0; 2026-11-24 @ 4aca9a8)
[3] [data/reading-production-safely — Data on private targets](/docs/data/reading-production-safely.md#data-on-private-targets) (shipped; agc >=0.3.0; 2026-11-24 @ 4aca9a8)
[4] [reference/error-code-catalog — Reference](/docs/reference/error-code-catalog.md#reference) (shipped; agc >=0.3.0; 2026-11-24 @ 4aca9a8)

## Known issues

- [data/mirror-db-tools](/docs/data/mirror-db-tools/known-issues.md)
- [data/reading-production-safely](/docs/data/reading-production-safely/known-issues.md)
- [reference/error-code-catalog](/docs/reference/error-code-catalog/known-issues.md)

<!-- feedback:start -->
---
Wrong, outdated or unclear? Run `agc feedback docs "fix/query.failed: <what is wrong>; error query.failed" --body <file>` with the sentence quoted in the file. No code or app data is sent.
<!-- feedback:end -->
