Demo Modern
Getting StartedError handling
Getting Started

Error handling

Handle failures predictably and preserve diagnostic context.

Northstar uses standard HTTP status codes and a consistent JSON error envelope.

Error response

json
{
  "error": {
    "code": "invalid_region",
    "message": "The selected region is not available.",
    "field": "region"
  },
  "request_id": "req_01J8ZA8E1T"
}

Common status codes

StatusMeaningRecommended action
400Invalid requestCorrect the submitted fields
401Invalid authenticationReplace or rotate the token
403Missing scopeGrant only the required scope
404Resource not foundVerify the identifier and workspace
409State conflictRefresh the resource before retrying
429Rate limit exceededWait for retry-after
5xxTemporary service failureRetry with exponential backoff

Retry safely

Retry connection errors, 429, and transient 5xx responses. Do not automatically retry validation or authorization failures.
Use an idempotency key for create and action endpoints. Reusing the same key returns the original result instead of repeating the operation.
Always log the request_id, endpoint, status, and error code. Never log bearer tokens or complete sensitive payloads.