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.

codedescription

400

Bad Request: Used when the client's request is malformed or invalid.

401

Unauthorized: Used when the client is not authenticated or when the authentication token has expired.

404

Not Found: Used when the requested resource is not present on the server.

405

Method Not Allowed: Used when attempting to access a resource with an unsupported HTTP method.

429

Too Many Requests: Used when the client has sent too many requests within a given time frame, typically indicating exceeding request limits.

3. 5xx: Server Error

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

codedescription

500

Internal Server Error: Used when an internal server error occurs. Specific details about the cause should be checked in the server logs.

503

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.

504

Gateway Timeout: Used when the server, acting as a gateway or proxy, did not receive a timely response from the upstream server.

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

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

Last updated

© 2023 OpsNow, Inc.