NOTHINGPHISHY
NOTHINGPHISHY / GETTING STARTED

Error handling

Use the HTTP status code to decide what to do next. The response can also include details that help diagnose the failure.

Common status codes

StatusMeaningWhat to do
400Invalid request or parametersCheck the request body, query fields, and encoding.
401Authentication failedCheck the access token and obtain a new one if needed.
403Access deniedCheck the account's permissions and access to the requested resource.
404Resource not foundCheck the identifier and resource path.
409 / 422Conflict or validation failureReview the response details and request data.
429Rate limit exceededReduce request frequency and retry with exponential backoff.
500Server errorRetry where appropriate or contact support with request details.

Error details

Some API errors include a code and message. The API gateway and individual endpoints can return different response shapes, so handle missing fields safely.

For a rate-limited request, the error code is Optimus-Err-0020 and the message is Rate limit exceeded.

Retrying requests

When you receive a 429, reduce request frequency and retry with exponential backoff. For server errors, retry only when appropriate for the operation; avoid unintentionally repeating a write request.

See Rate limits for categories and response headers.

NOTHINGPHISHY / API GUIDE