Skip to main content
Handled API errors use an error object with a machine-readable code and a diagnostic message:
Request validation returns HTTP 400. Validation messages include field paths where possible. Use the error code for handling and the message for diagnosis.

Request IDs

Every response from the API, including errors, has an X-Request-ID header. Yonda generates the value for each request and records it with that request. A request ID you send is ignored. A response without the header, such as a gateway timeout, did not come from the API.
Log it with your own records and quote it when contacting Yonda about a response.

Common request fixes

Handling failures

Requests are limited per installation after authentication and before calculation. Rotated keys for the same installation share the budget. Test and live installations have separate budgets. Invalid request bodies from authenticated callers still count. For HTTP 400 invalid_input and HTTP 401 authentication_failed, correct the request or credentials. Do not retry the request unchanged. For HTTP 429 rate_limit_exceeded, wait at least the number of seconds in Retry-After and add jitter before retrying. HTTP 500 calculation_failed means the calculation failed or its result could not be represented in the response. Retry a limited number of times with backoff. Repeating the request recalculates tax. Contact Yonda with the X-Request-ID, endpoint, status, and non-sensitive request details if failures persist. For HTTP 503 service_unavailable with Retry-After, wait at least the indicated number of seconds before retrying with backoff and jitter. Without Retry-After, authentication is not configured; contact Yonda and retry after it is restored. Contact Yonda if 503 responses persist.