Error codes

Khipu uses conventional HTTP status codes to indicate success or failure of an API request. The range 2xx is used to indicate a successful response and that everything worked as intended, while the 4xx is reserved for errors with the data provided in the request (missing or invalid authentication credentials, call to non-existent resource). The 500 error means that the request could not be processed on our side.

Code summary

HTTP Status Code
200 - OK The request was processed and a valid response was returned. Note that a response may include an empty Data object and still be considered correct. Response with "OK" in the Status field.
202 - Accepted The request was received and passed correctly to the asynchronous channel. The complete response will be delivered to the callback URL specified in the request. Response with "OK" in the Status field.
400 - Bad request The request could not be processed.
401 - Unauthorized Missing the authentication header, or the value is invalid (also applies to expired OAuth JWT).
404 - Not found The requested path does not exist in the server.
500 - Server error Something prevented the request to be executed and an error was thrown by our platform.

Failure messages

In addition to the HTTP status codes you must pay attention to the Status field of a valid response when its value is "ERROR". This means that something prevented a correct execution of your request, like an incorrect bank account number, for instance. The type of error is indicated in the FailureReason field of the response, and if there are more details available they are included in the Message field.

Possible failure reasons are:

  • TASK_FINISHED : The API met a controlled error while connecting to the data source (for example, an unexpected character or a bad credential).
  • LIFESPAN_EXCEEDED : This occurs when an asynchronous request could not be processed inside the configured time range. After making the async request, the API responds immediately with an object that includes the LifeSpan field, which is the maximum time that our service will try to fulfill your request. If the time expires without finishing the execution, you will be notified to the callback URL with the LIFESPAN_EXCEEDED failure.
  • PARSER_ERROR : The response from post processor is not valid or could not be parsed. This is an error in communication between services.
  • PARSER_ERROR_NOT_AVAILABLE : The post processing service is not available.
  • PARSER_ERROR_INTERNAL_ERROR : The post processing service failed parsing data. This means that the data source sent information that is not yet handled bye the post processor. It could be a change in naming, in values or in data types.
  • TASK_DUMPED : Our API could not finish the requested task, as it encountered an unexpected scenario.

All errors other than TASK_FINISHED and LIFESPAN_EXCEEDED are alerted in real time to our team, so we can take appropriate actions such as enhance the processor service and make a new deploy. With this approach, we aim to assure that our services' responses are as expected.