Logging & Errors

Slope uses standard HTTP status codes to denote an error. A 4xx range indicates an error on the client side while a 5xx range error indicates an issue on Slope's end. All errors will be returned in JSON format with these fields:

AttributeValue
statusCodeA HTTP status code
messageA human readable message
errorThe error type

Example error

{
    "statusCode": 404,
    "message": "customer not found",
    "error": "Not Found",
}

Request IDs

To better support in debugging, you should log the X-Amzn-RequestId found in the request headers.

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 123
X-Amzn-RequestId: ddbs0a5a-dbc3-11e8-9cdb-6b26c9479a31

This is the HTTP request ID generated by our backend gateway which can be useful if needing to debug a particular request.

In addition, you may supply an optional client generated UUID in the HTTP header field X-Request-ID which will be logged and returned back to you for debugging. If none is provided, we will automatically generated a UUID for you. This ID can be used to debug requests when hitting our API.