Navigating the ZignSec API is mostly seamless, but there are instances where you might encounter unexpected issues. This guide provides clarity on interpreting status codes, error types, and common responses to help you navigate these hiccups. ## Interpreting API Responses Every response from the API will come with a status code. This code acts as an initial indicator of the response nature. Remember that many reported errors are typically due to user mistakes. Before seeking assistance from ZignSec support, it's advisable to double-check your code and ensure you've adhered to the API documentation. ### Status Codes ZignSec API responses can be grouped into three categories based on their status codes: - Name `2xx` Indicates **Success**. Your request was accepted and processed without issues. - Name `4xx` Indicates a **Client Error**. The fault is likely in the request you made. - Name `5xx` Signifies a **Server Error**. The glitch is on our side, which we need to address. ### Common Error Responses In your interaction with the API, there are some typical error responses you might encounter. Here's a rundown: - **400**: This is a client error. It usually means the request was malformed or contains invalid data. - **401**: Indicates authentication failure. This is often due to missing or incorrect subscription keys. - **404**: Resource not found. The endpoint or the specific item you're trying to access doesn't exist. - **5xx**: Any status code starting with '5' is a server error. These errors are on our end and may require intervention from our team. ### Error Responses For unsuccessful requests, the ZignSec API returns an error response structured with an error type and accompanying message. #### Understanding Error Responses Each error response provides insights into the nature of the problem: - Name `api_error` An issue on our end. We'll look into it. - Name `invalid_request` Suggests an error in your request. #### Sample Error Response ### Error response format ```bash { "type": "api_error", "message": "An internal server error occurred" } ``` ### Error Response Structure For a more granular look, here's the standard structure of error responses: |Field|Type|Description| |---|---|---| |detail|string|Specific explanation of the error.| |instance|string($uri)|URI offering more context about the error type.| |status|integer($int32)|The HTTP status code for this specific error.| |title|string|A concise summary of the error type.| |type|string($uri)|URI categorizing the error type.| --- Armed with this knowledge, you'll be better equipped to address issues when interacting with the ZignSec API. If challenges persist, the ZignSec support team is always available to help.