Reference
Helix Cloud query failures use one JSON envelope:
erroris a stable, lower-snake-case code. Branch on this field.msgis a human-readable diagnostic. Log it, but do not parse it or depend on its exact text.- The HTTP status remains part of the contract. Use it with
errorwhen deciding whether and how to retry. write_outcome_unknownadds"retryable": false. Cypher statement errors add adetailsobject; see Cypher errors.
Gateway error reference
The text in
msg can include request-specific details. The error values and
HTTP statuses above are the compatibility surface.
Cypher errors
POST /v2/cypher and POST /v2/cypher/explain use the same envelope and gateway
codes. A failed statement also carries a details object:
error and the condition in details.detail are lower snake case
codes, listed in the query error reference.
A resource_limit (HTTP 429) is a per-query budget, not the database’s request
rate: resending the same statement fails again, so reduce the work instead of
honoring Retry-After. Check error to tell it apart from rate_limited.
SDK access
Official SDKs decodeerror and msg into separate stable-code and diagnostic
fields. Non-JSON responses from older endpoints and intermediaries remain
available as readable diagnostics. Rust and TypeScript also retain the raw
response body separately.
The current SDK error objects do not expose response headers, including
Retry-After. Use direct HTTP or an application transport that retains headers
when the exact Cloud rate-limit delay is required.
Branch on the stable code while retaining the diagnostic:
Timed-out writes
An HTTP408 cancels the gateway’s wait, but a write can race with durable
commit. A write that the gateway already sent to the writer returns 503 with
write_outcome_unknown and "retryable": false instead. In both cases, treat the
outcome as unknown. Reconcile using an application identity or idempotency key
before submitting the write again.
Migration from the previous shape
Some earlier responses usederror for diagnostic text and code for the
machine-readable value, while others returned only error. For Cloud gateway
responses, migrate from this shape:
error as the lower-snake-case code and msg as diagnostic text. Earlier
gateways also reported unknown write outcomes and unavailable failover waits in
that shape, as {"code":"WRITE_OUTCOME_UNKNOWN","error":"<message>","retryable":false}
and "code":"FAILOVER_WAIT_UNAVAILABLE". They are now write_outcome_unknown and
failover_wait_unavailable in the envelope above, and Cypher categories and
details, formerly upper camel case such as ResourceLimit, are lower snake case.
Current SDKs read both shapes. Keep a readable diagnostic fallback for
intermediaries and older self-hosted endpoints that do not return the Cloud
envelope.