Skip to main content
The Interstellas API uses the status field in the response envelope to signal success or failure. On error, status is false and message describes the problem.

Error response format

Error responses look like this:
boolean
Always false for error responses. Check this field first in your error-handling logic.
string
A human-readable description of what went wrong. Use this for logging and debugging.
string
A stable, machine-readable code identifying the error type. Branch your error handling on this field, not on messagemessage text may change, error.code won’t. See the table below for every value.
array
Field-level validation errors, each with a field and message. Only present when the error is caused by one or more invalid request fields — omitted entirely otherwise (not null, not []).
Error responses have no data field at all — not even data: null. Only success responses include data.

Error codes

HTTP status codes

Rate limit responses

A 429 response includes a Retry-After header — the number of seconds to wait before retrying:

Handling errors in code

Always check json.status (the field in the response body) in addition to the HTTP status code. Some error conditions may return 200 with status: false.

Authentication errors

A 401 AUTHENTICATION_ERROR is returned whenever a request can’t be authenticated. The message falls into one of two buckets:
  • "Unauthorized" — the request is missing x-api-key and/or x-api-secret entirely, or combines them with an Authorization: Bearer header (that combination is rejected).
  • "Invalid credentials" — both headers were sent, but the API key isn’t recognized, the secret doesn’t match, or the key has been revoked.
Neither message enumerates further — you can’t tell from the response alone which specific credential was wrong, which is intentional. If you receive a 401, check that:
  1. Both x-api-key and x-api-secret are present, exactly as issued (no truncation or extra whitespace).
  2. You are not also sending an Authorization: Bearer header alongside them.
  3. The key hasn’t been revoked or replaced by a regenerated secret — see Authentication for rotation and revocation timing.
A 403 FORBIDDEN means the credentials themselves are valid but aren’t permitted for the resource requested. See Authentication for the full credential reference, including rate limits.