Skip to main content

The error envelope

Every error response has the same JSON shape:
  • errorCode: a stable enum value. Branch your code on this, never on message. Codes are never repurposed; changed semantics always get a new code.
  • message: human-readable detail, safe to log and to show to operators.
  • correlationId: identifies this request across Passlet’s systems. Include it when you contact support about a failed request.

Field errors

When specific fields are the reason a request was rejected, the 400 response lists them in fieldErrors, one entry per offending field. That covers request validation failures (VALIDATION_ERROR) as well as template variables that are missing, don’t fit their type, or can’t be set:
  • field: the dot-separated path to the field in the request body, query, or path, for example variables.seat or passes.0.label.
  • code: why the field was rejected, from the same stable set as errorCode: MISSING_REQUIRED_FIELD (no value), INVALID_FORMAT (for example a malformed ID or timestamp), VALIDATION_ERROR (any other invalid value, including unknown fields), or an operation-specific code such as SYSTEM_VARIABLE_READONLY. Branch on this.
  • message: a short human-readable explanation. Like the top-level message, it is not part of the contract.

Common error codes

Endpoint pages list the specific statuses each operation can return.

Retry guidance

  • 4xx (except 429): don’t retry unchanged; fix the request.
  • 429 / 5xx: retry with exponential backoff and jitter.
  • Batch endpoints report per-item outcomes. A failed item never aborts the whole batch, so check the per-item results rather than the HTTP status alone.