Skip to content

Error handling

HTTP status code

HTTP Status Codes and their meanings are as follows.

HTTP Status CodeDescription
HTTP Status CodeDescription
2xxSuccess
400BAD_REQUEST - the request is invalid
401UNAUTHORIZED - API Token is not valid
403FORBIDDEN - API Token is valid but no authorization
404NOT FOUND - No resource
5xxSERVER ERROR - something wrong with Server

Error response

When an error occurs (HTTP Status Code is not 2XX), the following Error Object should be delivered in JSON format.

Error object

Description
AttributesTypeRequiredDescription
errorsObjectServer defined Error Code.
errors.nameStringError name
errors.messageStringThe error message that describes details of the error
errors.codeStringThe error code format in UPPERCASE
messageStringA detailed explanation of the error code. errorMessage must be written in English.
statusCodeNumberThe response status code

Sample error response

json
{
  "errors": {
    "name": "BadRequest",
    "message": "Bad Request",
    "code": "BAD_REQUEST"
  },
  "message": "Bad Request",
  "statusCode": 400
}

SkyJoy Integration Documentation