Error Handling

When integrating with the IZIX API, understanding how to handle errors effectively is crucial. The IZIX API utilizes standard HTTP response codes to signify the outcome of API requests. Here's what each range of response codes generally indicates:

  • 2xx codes denote success—the API request was successfully received, understood, and processed.
  • 4xx codes signify client errors—these errors occur because of an issue with the request, such as missing parameters or authentication failures.
  • 5xx codes indicate server errors—these suggest that IZIX’s servers encountered an issue and could not fulfill the request.

HTTP Status Code Summary

CodeStatus TextDescription
200OKThe request was successfully processed.
400Bad RequestThe request could not be understood due to missing parameters.
401UnauthorizedNo valid API key was provided.
402Request FailedThe request was valid but could not be completed as requested.
403ForbiddenThe API key lacks permissions to perform the request.
404Not FoundThe specified resource could not be found.
409ConflictThere was a conflict with another request (e.g., duplicate submissions).
429Too Many RequestsRequest rate exceeded. Recommended strategy: exponential backoff.
500Server ErrorA generic error occurred on the server.
502Bad GatewayThe server received an invalid response from the upstream server.
503Service UnavailableThe server is temporarily unavailable, usually due to maintenance or loading.
504Gateway TimeoutThe server did not receive a timely response from an upstream server.

Error Attributes

When an error occurs, the API response will include the following attributes to aid in diagnosing and handling the error:

  • event_id: An identifier for the event, which can be correlated with IZIX's monitoring tools.
  • code: A specific programmatic error code from IZIX that details the error type.
  • error: A short string identifier for the error, suitable for programmatic handling.
  • status: The HTTP status code of the error, which is also reflected in the HTTP status header of the response.
  • details: A human-readable explanation providing more insight into the nature of the error.

By using this structured format for error reporting, developers can more easily implement robust error handling and debugging strategies, ensuring a smoother integration process with the IZIX API.