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 CodeDescription
100OK: Indicates a successful transaction.
400Bad Request: Occurs for an invalid request.
401Unauthorized: Unauthorized token used for the request.
403Forbidden: The requested function is not available for your account.
404Not Found: The specified object could not be found.
405Method Not Allowed: Consumer tried to access an object with an invalid method.
409Conflict: The requested action conflicts with the current state of the object.
500Internal Server Error: Occurs when anything goes wrong in CrediLinq API.
503Service 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.

ParameterDatatypeDescription
**statusCode**numberThe HTTP status code of the error.
**errorCode**stringComputer-readable code for error handling.
**error**Array - stringHuman-readable generic error message.
**message**Array -stringHuman-readable error message containing all available details about how the error occurred.
**success**booleanA 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.
Informational

2xx: This indicates that the client's request was accepted successfully.
Success

3xx: Indicates that the client must take some additional action to complete their request.
Redirection

4xx: This category of error status codes points to the clients.
Client Error

5xx: 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 Code

For more information please refer https://developer.mozilla.org/en-US/docs/Web/HTTP/Status