# Errors

opsnow\.io uses standard HTTP response codes to indicate the success or failure of API requests. Typically, they are as follows:

#### 1. 2xx: Success

#### 2. 4xx: Client Error

* Indicates inaccurate or incomplete parameters.

<table><thead><tr><th width="131">code</th><th>description</th></tr></thead><tbody><tr><td>400</td><td>Bad Request: Used when the client's request is malformed or invalid.</td></tr><tr><td>401</td><td>Unauthorized: Used when the client is not authenticated or when the authentication token has expired.</td></tr><tr><td>404</td><td>Not Found: Used when the requested resource is not present on the server.</td></tr><tr><td>405</td><td>Method Not Allowed: Used when attempting to access a resource with an unsupported HTTP method.</td></tr><tr><td>429</td><td>Too Many Requests: Used when the client has sent too many requests within a given time frame, typically indicating exceeding request limits.</td></tr></tbody></table>

#### 3. 5xx: Server Error

* Indicates that there is an error on the opsnow\.io server.

<table><thead><tr><th width="122">code</th><th>description</th></tr></thead><tbody><tr><td>500</td><td>Internal Server Error: Used when an internal server error occurs. Specific details about the cause should be checked in the server logs.</td></tr><tr><td>503</td><td>Service Unavailable: Used when the server is temporarily unable to handle the request. This could occur, for example, when the server is overloaded or undergoing maintenance.</td></tr><tr><td>504</td><td>Gateway Timeout: Used when the server, acting as a gateway or proxy, did not receive a timely response from the upstream server.</td></tr></tbody></table>

opsnow\.io also outputs error messages and error codes in JSON format.

```
{
    "status": "fail",
    "error": {
        "code": 401,
        "message": "Unauthorized"
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opsnow.io/opsnow-developer-guide/errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
