Error Handling in the Wasabi AiR API
    • 21 May 2024
    • 1 Minute to read
    • PDF

    Error Handling in the Wasabi AiR API

    • PDF

    Article summary

    The HTTP status code in the response indicates whether or not the request was successful. Any 2xx request is considered successful.

    If a request is unsuccessful, the status code reflects what went wrong. The most common failures are:

    • 404 - Not found: The resource you are attempting to retrieve was not found.
    • 401 - Unauthorized: You do not have permission to access the resource.
    • 400 - Bad Request: The request you made is bad and must be changed before it is retried.
    • 500 - Internal Server Error: Something went wrong internally. You should wait and try again before reporting the issue.

    Error Details

    In most cases, the body for a non-2xx response contains a JSON object describing the error in the following format:

    {
        "error": "{error-message}"
    }
    • {error-message} - (string) A human-readable description of the error.

    Error messages are safe to present to users.



    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence