Skip to main content

Error codes

RushDB reports every failure with one stable error code, whatever the transport. This page lists the codes, how each transport renders them, and the HTTP statuses that occur outside the protocol taxonomy.

Error body​

On HTTP a protocol error has this shape:

{
"protocolVersion": 1,
"error": {
"code": "write_conflict",
"message": "serializable_conflict on write at ci 4812",
"retryable": true
}
}
  • code is one of the snake_case values below.
  • retryable is true when the same request may succeed if retried later. It defaults from the code (resource_exhausted, unavailable, write_conflict are retryable) and is turned off for fixed limits that a retry cannot fix (for example a transaction over its operation limit).
  • For an internal fault the message is replaced with internal execution error; the detail is written to the server log.

Protocol error codes​

CodeMeaningRetryableHTTPpgwire SQLSTATEgRPC statusBolt code
unsupported_versionprotocolVersion is not 1.no4260A000INVALID_ARGUMENTNeo.ClientError.Request.Invalid
protocol_violationThe request broke the protocol contract.no40008P01INVALID_ARGUMENTNeo.ClientError.Statement.SyntaxError
invalid_requestMalformed request: bad JSON, unknown query key, invalid argument, oversized body.no40042601INVALID_ARGUMENTNeo.ClientError.Statement.SyntaxError
unauthorizedCredential missing or wrong, capability lacks the permission, or a data-access policy denies the read.no40142501UNAUTHENTICATEDNeo.ClientError.Security.Unauthorized
missing_scopeMultitenant mode and no tenant scope supplied.no4033D000UNAUTHENTICATEDNeo.ClientError.Security.Unauthorized
scope_mismatchcontext.scope differs from the transport scope, or a scope was sent to a single-tenant server.no4033D000UNAUTHENTICATEDNeo.ClientError.Security.Unauthorized
not_foundRecord, index, property, or other target does not exist.no40442P01NOT_FOUNDNeo.ClientError.Statement.EntityNotFound
conflictConstraint or state conflict (already exists, label changed, stale reference). Retrying the same request will fail again.no40923505ALREADY_EXISTSNeo.ClientError.Constraint.UniqueConstraintViolation
write_conflictSnapshot-isolation write conflict (first committer wins). The transaction was aborted; retry it.yes40940001ABORTEDNeo.TransientError.Transaction.DeadlockDetected
cancelledThe request deadline passed or the request was cancelled.no49957014CANCELLEDNeo.ClientError.Transaction.TransactionTerminated
resource_exhaustedA budget was exhausted: query memory, transaction staging, commit size, write-lock wait.yes (no for fixed per-request limits)42953200RESOURCE_EXHAUSTEDNeo.TransientError.General.DatabaseUnavailable
unavailableTemporarily unable to serve: overload, tenant capacity, maintenance mode, follower read-only, shutting down.yes50357P03UNAVAILABLENeo.TransientError.General.DatabaseUnavailable
execution_failedExecution failed for another reason, including internal faults.no422XX000INVALID_ARGUMENTNeo.DatabaseError.Execution.Failed
language_disabledThe statement's language is not enabled on this server.no4220A000INVALID_ARGUMENTNeo.ClientError.Statement.SyntaxError
unsupportedRecognized but not implemented by this engine (for example an unsupported clause or operator).no4220A000INVALID_ARGUMENTNeo.ClientError.Statement.SyntaxError

HTTP statuses outside the taxonomy​

Some responses are produced by the HTTP layer before or after protocol execution. Their status does not always follow the table above.

StatusBodyCauseWhat to do
401{"error":"unauthorized"}No valid token or capability, or the capability lacks the needed permission.Check the Authorization / X-RushDB-Token header.
400protocol error missing_scopeMultitenant server and no X-RushDB-Tenant header.Send the header.
400protocol error invalid_requestX-RushDB-Tenant longer than 1024 bytes.Shorten the scope.
404{"error":"route not found"}Unknown path.—
413protocol error invalid_requestRequest body larger than server.body-limit.Split the request.
413protocol error execution_failedThe response would exceed the server.body-limit output budget.Page the query (smaller limit, cursors).
503protocol error unavailableScheduler at capacity (server at request capacity; retry shortly), node still booting, or a write while free disk is below disk-space-threshold-percent.Retry with backoff; for disk, free space.
429protocol error resource_exhaustedHTTP in-flight body budget full (too many request bytes in flight).Retry with backoff.
500protocol error execution_failed, internal execution errorInternal fault; detail in the server log.Check the log.

During boot, any request other than /health and /ready gets 503 with {"code":"unavailable","message":"node is starting (<phase>)","retryable":true} and a Retry-After: 1 header.

Replication endpoint​

StatusBodyMeaning
400{"error":"follower_id is required"}Missing query parameter.
401{"error":"unauthorized"}Not the leader's boot token.
409{"error":{"code":"resync_required","oldestAvailableLsn":N,...}}The requested history was pruned; rebuild the follower from a base backup.
503{"error":"promotion requested but the replication task has not stopped yet"}Promotion did not finish within 5 s; call again.

pgwire-specific SQLSTATEs​

Besides the mapping above, the PostgreSQL wire adapter raises:

SQLSTATECause
3D000Multitenant server and the connection has no database parameter.
42601The SQL could not be parsed or described.
22P02A result value cannot be encoded as the column's declared type.
0A000A binary-format parameter of an unsupported type.

The server answers N to an SSL request (no TLS on pgwire), so clients must connect with sslmode=disable or prefer.

Common messages​

Message (prefix)CodeMeaning
maintenance mode: writes are rejected until maintenance is clearedunavailableServer started with --maintenance.
this node is a streaming-replication follower; writes must go to the leaderunavailableWrite sent to a follower.
tenant concurrent request limit exceededunavailablePer-tenant cap or scheduler queue full.
tenant_capacityunavailableResident-tenant budget full of active tenants.
query language ... is not enabledlanguage_disabledEnable it with --languages.
resource exhausted: transaction operation limitresource_exhausted (not retryable)Over tx-max-operations.
resource exhausted: transaction staging byte limitresource_exhausted (not retryable)Over tx-max-staged-bytes.
storage resource exhausted: expanded mutation batch exceedsresource_exhausted (not retryable)Over max-expanded-commit-bytes.
query working set exceededresource_exhaustedOver query-memory-max.
serializable_conflict / transaction_conflictwrite_conflictConcurrent write to the same data; retry.
policy-enforced reads are unavailable for this adapterunauthorizedA data-access policy is enforced and this read path cannot apply it.
index DDL is a mutation; send it as mutate.statementinvalid_requestIndex DDL sent as a query.
SQL parse failed / SQL statement is not read-onlyinvalid_requestA SQL syntax error, or a write sent through query.statement.
SQL write conflict / query-language write conflictwrite_conflictAnother write to the same tenant committed after the statement's snapshot; retry.
query-language mutation graph exceeds the bounded budgetresource_exhausted (not retryable)A Cypher/GQL write over too large a tenant graph.
invalid predicate (for example divide by zero)invalid_requestThe query's own expression cannot be evaluated.
cursorTtlMs must be greater than zero / ttlMs must be greater than zeroinvalid_requestZero lifetimes are refused.
unknown transactionnot_foundStage or rollback of a transaction that does not exist (or was settled).
transaction ... expiredconflictStage or rollback after the transaction's TTL lapsed.
import options / invalid import optioninvalid_requestWrongly typed ingest or put options.
catalog detail does not support a predicateinvalid_requestdetail: "catalog" with a predicate.
property ... does not existnot_founddeleteProperty of an unknown name.
record ... already existsconflictputRecord create with the id of an existing record.
aggregate exceeds 1000 distinct groupsresource_exhausted (not retryable)Narrow the grouping or add filters.

See also​