Errors

As we work with the API, there may be times when something goes wrong. Errors happen, and the majority of them will require your attention. Check out the types of status codes and errors you might encounter.

The status code in an API response indicates whether it was successful or not. To figure out what went wrong, you can review the error type and error message (before contacting support) to determine what went wrong.


HTTP Error Codes

The Hoppah API returns the following status codes in different categories. You can use these to find out if a request was successful.

  • Name
    200
    Description

    Request was successful

  • Name
    400
    Description

    The request could not be understood by the server due to malformed syntax or missing parameters.

  • Name
    401
    Description

    The request requires user authentication. The user's token may have expired or the credentials provided are invalid.

  • Name
    403
    Description

    The server understood the request but refuses to authorize it. This could be due to insufficient permissions.

  • Name
    404
    Description

    The server cannot find the requested resource. This could be due to a wrong endpoint or resource no longer exists.

  • Name
    5xx
    Description

    A generic error message indicating that something went wrong on the server-side. The server is unable to fulfill the request. Check out our API Status page for more information


Error types

Whenever a request is unsuccessful, the Hoppah API will return an error response with an error type and message. You can use this information to understand better what has gone wrong and how to fix it. Most of the error messages are pretty helpful and actionable.

Here is a list of the two error types supported by the Hoppah API — use these to understand what you have done wrong.

  • Name
    error
    Description

    Provides a brief description of the error that occurred. This field is useful for identifying the nature of the problem.

  • Name
    status
    Description

    Indicates the status of the request. When set to false, it signifies that an error occurred. This field helps in quickly determining the outcome of the request.

Error response

{
  "error": "Invalid request parameters",
  "status": false
}

Was this page helpful?