API Error Handling

Below is a list of errors codes that can be encountered while using the api.

In the event of an error, the response will contain a errorCode and errorMessage.

API Error Codes

HTTP Errors Error Code Error Message
API_OKAY0Everthing Is Awesome
API_UNATHOURISED401challenge them to login
API_FORBIDDEN403they are logged in but still not allowed
API_RESOURCE_NOT_FOUND404resource not found
Resource Errors Error Code Error Message
ITEM_NOT_FOUND1000Item You are Looking For Could Not Be Found
ITEM_ALREADY_EXISTS1001Item you tried to create already exists
Parameter Errors Error Code Error Message
MISSING_PARAMETER1100 One or more parameters were missing
INVALID_PARAMETER1101 Supplied parameter was invalid
Request Type Errors Error Code Error Message
REQUEST_METHOD_NOT_SUPPORTED1200unexpected request method. Expecting either either post or get request type
REQUEST_METHOD_POST_REQUIRED1201must be request method post
REQUEST_METHOD_GET_REQUIRED1202must be request method get

Example Error Response

In the example response below you will notice the error code 1000 which means the hash did not match any url.

{
    data: null,
    errorCode: 1000,
    errorMessage: "No url found matching hash: wxyz"
}