Skip to main content
Every error response from the Cherry Shot API follows the same JSON envelope — one top-level error object containing a machine-readable code and a human-readable message. Always branch your error-handling logic on error.code: it is a stable, versioned string that will not change between releases. The message field is intended for logs and debugging only, and its exact wording may change at any time without notice.

HTTP status codes

Error codes

For security, 500 responses always return a generic message; the full detail is captured in server-side logs. If you encounter a persistent 500, share the request time and endpoint path with Cherry Shot support so the team can trace it.

Handling errors in code

The examples below show a minimal but complete error-handling pattern. Check the HTTP status first, then switch on error.code for precise recovery logic.