If you receive an error from the API, a response code will be set indicating the error with a payload that will optionally contain additional error details. The following is an example error message:
{"statusCode":401,"message":"Unauthorized"}
The API documentation for individual routes contains any potential error codes for that route.