Reference

Errors

Stable error codes, HTTP statuses, gRPC mappings, retry guidance, reason codes, field paths, correlation IDs, and explainability links.

Every Vadyl surface returns a typed error envelope. Human-readable messages may improve over time; code, reasonCode, field, correlationId, and retry classification are the stable integration contract.

Error envelope

{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "Order.total must be greater than zero.",
    "reasonCode": "Order.Validation.Total.NonPositive",
    "field": "total",
    "retryable": false,
    "correlationId": "01HXZ0J4YV8AJF2GFG2T1F7Y42",
    "explainUrl": "/api/Explainability/access/read?correlationId=01HXZ0J4YV8AJF2GFG2T1F7Y42",
    "details": {
      "entity": "Order",
      "operation": "Create"
    }
  }
}

Catalog

StatusCodeMeaningRetry
400BAD_REQUESTMalformed JSON, invalid enum literal, unknown route binding, or impossible request shape.Fix request before retrying.
401UNAUTHORIZEDMissing, expired, malformed, or unsupported authentication material.Refresh token or repair credentials.
403ACCESS_DENIEDAuthenticated actor lacks the required grant, row predicate, field permission, scope, or envelope authority.Do not retry without a permission or input change.
404NOT_FOUNDResource is absent or hidden by access policy.Re-read list/search or verify actor scope.
409CONFLICTOptimistic concurrency mismatch, unique-key collision, branch/proposal conflict, dependency conflict, or irreversible effect conflict.Usually re-read and retry with a new concurrency token.
412PRECONDITION_FAILEDIf-Match, publication pin, branch head, approval gate, or compatibility precondition failed.Refresh authority state and retry if still intended.
422VALIDATION_FAILEDEntity validation, AST validation, capability validation, policy grammar, schema transition, or typed payload validation failed.Fix the typed input.
429QUOTA_EXCEEDEDHard quota, rate limit, token budget, runtime budget, or plan reservation exceeded.Retry after reset only when headers or quota policy allow.
503UPSTREAM_UNAVAILABLEProvider, connector, model, storage, cache, or runtime substrate unavailable.Retry with backoff when idempotency guarantees exist.
504UPSTREAM_TIMEOUTConnector/runtime/provider call exceeded the platform or declared egress deadline.Retry only idempotent operations or provide Idempotency-Key.
gRPCPERMISSION_DENIEDgRPC projection of ACCESS_DENIED with Vadyl error details.Same as ACCESS_DENIED.

Examples

BAD_REQUEST

{ "error": { "code": "BAD_REQUEST", "message": "Invalid filter JSON" } }

UNAUTHORIZED

{ "error": { "code": "UNAUTHORIZED", "reasonCode": "Auth.MissingBearer" } }

ACCESS_DENIED

{ "error": { "code": "ACCESS_DENIED", "reasonCode": "Access.DeniedByPolicy" } }

NOT_FOUND

{ "error": { "code": "NOT_FOUND", "resource": "Order", "id": "ord_missing" } }

CONFLICT

{ "error": { "code": "CONFLICT", "reasonCode": "Concurrency.TokenMismatch" } }

PRECONDITION_FAILED

{ "error": { "code": "PRECONDITION_FAILED", "expected": "pub_412", "actual": "pub_413" } }

VALIDATION_FAILED

{ "error": { "code": "VALIDATION_FAILED", "field": "total", "reasonCode": "Order.Total.NonPositive" } }

QUOTA_EXCEEDED

{ "error": { "code": "QUOTA_EXCEEDED", "quota": "read.monthly" } }

UPSTREAM_UNAVAILABLE

{ "error": { "code": "UPSTREAM_UNAVAILABLE", "provider": "stripe", "retryable": true } }

UPSTREAM_TIMEOUT

{ "error": { "code": "UPSTREAM_TIMEOUT", "deadlineMs": 30000 } }

PERMISSION_DENIED

code: PERMISSION_DENIED
details: { code: "ACCESS_DENIED", reasonCode: "Access.DeniedByPolicy" }

GraphQL mapping

{
  "data": { "orders": null },
  "errors": [{
    "message": "Access denied",
    "path": ["orders"],
    "extensions": {
      "code": "ACCESS_DENIED",
      "reasonCode": "Access.DeniedByPolicy",
      "correlationId": "01HXZ0J4YV8AJF2GFG2T1F7Y42"
    }
  }]
}

gRPC mapping

Vadyl codegRPC status
UNAUTHORIZEDUNAUTHENTICATED
ACCESS_DENIEDPERMISSION_DENIED
NOT_FOUNDNOT_FOUND
CONFLICTABORTED
VALIDATION_FAILEDINVALID_ARGUMENT
QUOTA_EXCEEDEDRESOURCE_EXHAUSTED
UPSTREAM_TIMEOUTDEADLINE_EXCEEDED

Retry contract

Retry only when the error is marked retryable or when the operation is idempotent and you supplied an Idempotency-Key. Writes, external egress, workflow signals, webhook replays, agent tool calls, and deployment commands should always carry an idempotency key when a client might retry.