---
description: "Check HTTP status and legacy response bodies before processing data."
group: "API fundamentals"
order: 9
---

# Handling errors

Check HTTP status and legacy response bodies before processing data.

Paydro’s existing JSON resources do not all use one error envelope. Check the HTTP status, content type, and response body before processing a response as a resource.

## Authentication and permissions {#authentication-and-permissions}

Incorrect Basic credentials return a legacy `403` with this structure:

```json
{"status":403,"title":"Unauthorized","detail":"User name and password combination are incorrect"}
```

Missing credentials can result in a login redirect. Do not automatically follow that redirect and decode the final HTML as JSON. Confirm credentials on the origin and verify the account’s organization and event rights.

## Invalid input {#invalid-input}

Invalid event discovery years return `400` and an `error`/`detail` object. Unknown paths can return `404`. Invalid order IDs can return `{"error":"no_valid_id"}` through a legacy redirect response. Treat a recognized error property as failure even when a legacy response status is successful.

## Pagination errors {#pagination-errors}

A list page past the end may use a redirect/error response. Stop after a short page, and distinguish an out of range page from an authentication error. Keep the last successfully imported page until the entire import is complete.

## Temporary failures {#temporary-failures}

For `429`, honor `Retry-After`. Back off after network errors or server failures. A temporarily unavailable authentication rate limit store can produce `503`. Correct authentication/permission failures before retrying; see [retry guidance](/en-us/docs/rate-limits-and-retries.md).

## Report a problem {#report-a-problem}

Capture the method, path, response status, and timestamp. Sanitize credentials and personal data before sharing logs with [support](/en-us/support).
