Responses

HTTP status codes

Hakuna uses conventional HTTP status codes to indicate the success or failure of an API request. Codes in the 2XX range indicate a successful request, and codes in the 4XX range indicate a failed request, typically due to invalid inputs or operations.

Here's a summary of the HTTP status codes you could receive from the Hakuna API:

STATUS CODE
DESCRIPTION

200

Success

400

Bad Request

401

Unauthorized

404

Entity Not Found

Error responses

When an unsuccessful request occurs, you will receive a payload in the following format:

{
    "error": {
        "error_code": "supported_error_code",
        "validation_errors": []
    }
}

All error payloads will contain a unique error_code which you can use to identify the error. In case of a badly formed request, Hakuna will also return additional validation_errors.

Last updated