You will be informed if the API encounters an error. Error codes fall into two broad categories: request and internal errors.

Request errors can usually be rectified by correcting the illegal part of the request. Internal errors are problems with the API itself, and beyond user control. We monitor closely for internal errors, but if you are experiencing prolonged periods of internal error codes, please report the issue to GoSquared Support citing the request URL and response body.

HTTP status codes

  • If the error is deemed a "request" error, the HTTP status code will be 400 "Bad Request".
  • If the error is deemed an "internal" error, the HTTP status code will be 500 "Internal Server Error".

Error responses

Along with an HTTP status code, the API will send back information about the error in the response body. If an error occurs, the key "error" will be set in the base response object, containing a message and unique code. For example, a request to the endpoint:

http://api.gosquared.com/imnotalegalfunction

will return an error reponse:

{
    "error": {
        "code": 400,
        "message": "The specified function 'imnotalegalfunction' does not exist."
    }
}
Last modified: 7 July 2011 13:27