Response & Errors
An overview of CrediLinq errors and responses that indicates how developers should handle these cases.
API Response
CrediLinq uses conventional HTTP response codes to indicate the success or failure of an API request. In general:
Response Code | Description |
---|---|
100 | OK : Indicates a successful transaction. |
400 | Bad Request : Occurs for an invalid request. |
401 | Unauthorized : Unauthorized token used for the request. |
403 | Forbidden : The requested function is not available for your account. |
404 | Not Found : The specified object could not be found. |
405 | Method Not Allowed : Consumer tried to access an object with an invalid method. |
409 | Conflict : The requested action conflicts with the current state of the object. |
500 | Internal Server Error : Occurs when anything goes wrong in CrediLinq API. |
503 | Service Unavailable : We're temporarily offline for maintenance. Please try again later. |
500 Support
Developer should contract CrediLinq support team once they recieve
500- Internal Server Error
. Our engineering team are always on stand by to fix the issue once they are reported.
Error Object
All CrediLinq error objects follow a similar structure that enables developers to track errors using a static code approach. Here are the error object details.
Parameter | Datatype | Description |
---|---|---|
**statusCode** | number | The HTTP status code of the error. |
**errorCode** | string | Computer-readable code for error handling. |
**error** | Array - string | Human-readable generic error message. |
**message** | Array -string | Human-readable error message containing all available details about how the error occurred. |
**success** | boolean | A boolean indicating whether this was a success response or an error response. |
Here is what a typical error response looks like.
{
"statusCode": 400,
"error": "Bad Request",
"errorCode": [
"E_D_NOT_FOUND"
],
"message":[
"Requested drawdown does not exist in our system."
],
"success": false
}
Graceful Error Handling
Our libraries raise exceptions for many reasons, such as parameters issues, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.
Additional HTTP Response Codes
Other standard HTTP errors may be generated by our stack and not directly from our API. Here are the categories of possible Standard HTTP response codes.
1xx: Communication transfer protocol-level information.
Informational2xx: This indicates that the client's request was accepted successfully.
Success3xx: Indicates that the client must take some additional action to complete their request.
Redirection4xx: This category of error status codes points to the clients.
Client Error5xx: This category of error is related to server exceptions due to internal incapability to perform the request. The user is advised to contact CrediLinq Support.
Server CodeFor more information please refer https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
Updated almost 2 years ago