Skip to main content
Defendis API uses standard HTTP status codes and a JSON error envelope. This page explains how to handle errors safely in production, including which scenarios are retryable.

Error response format

Most error responses use this shape:
Implementation principles:

Treat errors as text

Treat error as a human-readable reason, not a stable enum.

Stay forward-compatible

Ignore unknown response fields for forward compatibility.

Protect secrets in logs

Never log secrets, especially the Authorization header.

Status codes and retry actions

Common examples

Backoff snippet

JavaScript backoff snippet
Python backoff snippet

Troubleshooting checklist

When contacting Support, include:
1

Request path

Include the request path example: /api/v1/dataleaks/stats
2

Request timing and correlation

Include the UTC timestamp and your client request ID.
3

Error details

Include the HTTP status code and the error response body.
4

Request parameters

Include the parameters you sent, with sensitive values redacted.