♻️ 7. Error Handling & Retry Logic

Última actualización Hace 9 meses

Summary:
The API suite includes standardized error codes and guidelines for retry logic, especially when dealing with document upload or extraction delays.

HTTP Status Codes:

  • 200 OK – Successful request

  • 400 Bad Request – Malformed payload or missing fields

  • 401 Unauthorized – Missing or invalid token

  • 422 Unprocessable Entity – Document failed validation checks

  • 500 Internal Server Error – Unexpected failure (try again later)

Retry Strategy:

  • Implement exponential backoff for temporary errors (5xx)

  • Avoid retries on client errors (4xx), except for 422 with correctable input

  • Maximum retry limit: 5 attempts per session