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.
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."
}
}