Troubleshooting Knox Cloud Services

Standard HTTP error codes

The following table lists the most common HTTP error responses:

Code Name Description
400 Bad Request The client has issued an invalid request. This code is commonly used to specify validation errors in a request payload.
401 Unauthorized Authorization for the API is required, but the request was not authenticated.
403 Forbidden The request was authenticated but does not have the appropriate permissions, or the requested resource cannot be found.
404 Not Found Specifies that the requested path does not exist.
406 Not Acceptable The client has requested a MIME type via the Accept header for a value not supported by the server.
422 Unprocessable Entity The client has made a valid request, but the server cannot process it. This response is often returned for APIs when certain limits are exceeded.
429 Too Many Requests The client has exceeded the number of requests allowed for a given time window.
500 Internal Server Error An unexpected server error has occurred. These errors should be rare.
501 Not Implemented The client request was valid and understood by the server, but the requested feature has yet to be implemented. These errors should be rare.

Unique Cloud authentication error codes

The Knox Cloud authentication API has several custom error codes which provide more information than the standard HTTP error response codes. The following table lists the unique Knox Cloud error codes and their descriptions:

Code Message Description
4002250 API_KEY_NON_UNIQUE_JWTID Cannot use the same jwt again. A newly signed jwt needs to be created.
4002251 ACCESS_TOKEN_TIMEOUT_VALIDITY_RESOURCE_INVALID_PARAM Incorrect parameter type was entered. Ensure that validityForAccessTokenInMinutes parameter is $int32
40122050 ACCESS_TOKEN_BAD_REQUEST Jwt improperly created. Check whether jwt was properly signed.
4032251 ACCESS_TOKEN_EXPIRED Provided Access token has expired. A new access token needs to be generated
4032252 ACCESS_TOKEN_INVALID Provided Access token is invalid for this api.
4042251 API_KEY_RESTRICTION_NOT_FOUND The IP address or http referer are empty.
4042252 API_KEY_RESTRICTION_INVALID The IP address or http referer are invalid.
4000000 RESOURCE_INVALID_PARAM Invalid parameter provided.
4040000 RESOURCE_NOT_FOUND Resource not found.