Success Responses (2xx)
These indicate that the request was successfully received, understood, and processed.200 OK
- Meaning: Your request was handled correctly and the response contains the requested data.
Client Errors (4xx)
These indicate issues with the client’s request.400 Bad Request
- Meaning: The request was invalid. Often caused by malformed parameters or validation failures.
401 Unauthorized
- Meaning: Authentication is required and has either failed or not been provided.
403 Forbidden
- Meaning: You are authenticated but not authorized to access the requested resource.
404 Not Found
- Meaning: The requested resource does not exist or the URL is incorrect.
406 Not Acceptable
- Meaning: The request is not acceptable.
409 Conflict
- Meaning: The request could not be completed due to a conflict with the current state of the resource, such as trying to create a duplicate record.
Server Errors (5xx)
These indicate that the request was valid, but the server failed to fulfill it.500 Internal Server Error
- Meaning: A generic error occurred on the server. This usually requires internal investigation.
502 Bad Gateway
- Meaning: The API tried to communicate with an upstream service and received an invalid response.
503 Service Unavailable
- Meaning: The server is currently unable to handle the request due to maintenance or overload.
Error Handling Best Practices
- 4xx Client Errors: Check your request payloads, authentication tokens, and route parameters.
- 5xx Server Errors: These are rare. If you encounter one, retry after a short delay or report it to support.
- Use Retry Logic: For
429,502, and503responses, implement exponential backoff retry strategies. - Log Everything: Always log errors with their
statusCode,message, andtimestampfor easier debugging.
Need help with an error that’s not listed here? Contact Sapphire Credit Developer Support.

