Introduction

Errors

Failed responses use a shared JSON envelope so clients can branch on error.code.

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Location was not found.",
    "details": {}
  }
}

HR may also include request_id.


Common codes

HTTPerror.codeMeaning
400INVALID_REQUESTMalformed request
401UNAUTHORIZEDMissing or invalid JWT
403FORBIDDENAuthenticated but not permitted
404NOT_FOUNDResource missing (or a *_NOT_FOUND variant)
409CONFLICTVersion, state, or idempotency conflict
422VALIDATION_ERRORBody or organisation bootstrap failed
500INTERNALUnexpected server error

Service-specific codes include VERSION_CONFLICT, INVALID_STATE_TRANSITION, CERTIFICATION_EXPIRED, and PLANNING_FAILED. The OpenAPI spec for each Worker lists the codes that route can return.


Idempotency

Creates and some mutations accept Idempotency-Key. Replaying the same key returns the original result or IDEMPOTENCY_CONFLICT if the payload differs.