title: Errors source_url: /developer-api/v1/error-handling summary: The Ramp API returns detailed error information in the response body along with standard HTTP status codes. This allows you to quickly diagnose and address issues with your API requests. content: The Ramp API returns detailed error information in the response body along with standard HTTP status codes. This allows you to quickly diagnose and address issues with your API requests. Here is an example of an error response: The handling of fields that are not in the endpoint specification depends on the endpoint and its request schema: Some endpoints ignore unknown query parameters or request body fields. Other endpoints reject unknown fields and return a validation error. This also applies to some nested request objects. A request must include all required fields and satisfy the validation rules for the endpoint. Do not rely on unknown fields being accepted or ignored. Validate each request against the endpoint specification, and correct misspelled or unsupported field names. Inspect HTTP Status Codes: Use status codes to identify the category of the error (e.g., 4xx for client errors, 5xx for server errors). Inspect HTTP Status Codes: Use status codes to identify the category of the error (e.g., 4xx for client errors, 5xx for server errors). Utilize the error_v2 Field: Parse the error_code and additional_info to pinpoint the issue and provide actionable feedback in your application. Utilize the error_v2 Field: Parse the error_code and additional_info to pinpoint the issue and provide actionable feedback in your application. Log Errors: Log error responses, including the x-trace-id from the response headers, for easier debugging and communication with Ramp developer support. Log Errors: Log error responses, including the x-trace-id from the response headers, for easier debugging and communication with Ramp developer support. Implement Retry Logic: For transient errors (e.g., 429 Too Many Requests or 5xx), implement exponential backoff to retry requests. Implement Retry Logic: For transient errors (e.g., 429 Too Many Requests or 5xx), implement exponential backoff to retry requests. Provide User Feedback: Use the message field to display clear and concise error messages to users, when applicable. Provide User Feedback: Use the message field to display clear and concise error messages to users, when applicable. HTTP Status Description 400 Bad Request - Invalid request format 401 Unauthorized - Invalid or missing API token 403 Forbidden - Insufficient permissions 404 Not Found - Resource doesn't exist 422 Unprocessable Entity - Validation errors 429 Too Many Requests - Rate limit exceeded 500 Internal Server Error - Server-side issue 504 Gateway Timeout - Request exceeded the 60-second timeout