Skip to main content
Version: 2023-01-01

Errors

Conventional HTTP status codes are used to indicate the success or failure of an API request:

  • 2xx codes indicate success.
  • 4xx codes indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.).
    Errors that could be handled programmatically (e.g., an entity does not exist) include an error code that explains the error reported.
  • 5xx codes indicate an error within Scale servers (these are rare).
HTTP CodeReasonDescription
200OKEverything worked as expected.
400Bad RequestThe request was unacceptable, often due to missing a required parameter.
401UnauthorizedNo valid authentication provided.
403ForbiddenThe provided identity doesn't have permissions to perform the request.
404Not FoundThe requested resource doesn't exist.
422Unprocessable ContentThe parameters were valid but the request failed (e.g., an entity with the same name already exists).
429Too Many RequestsToo many requests hit the API too quickly.

Attributes of the error response object:

  • code - A short string that uniquely identifies the error. See Error Codes for more information.
  • message - A human-readable message providing more details about the error.
  • traceId - A unique identifier of the request that caused the error to be used for debugging purposes.
  • details (Optional) - An object that provides more detailed information about the error. The structure of this object is not fixed and can change depending on the error.

Example

HTTP 422 Unprocessable Content
{
"code": "entity_not_unique",
"message": "Entity violates one or more uniqueness constraints.",
"traceId": "00-49b5250fc418ce6cf5086647a2d6ff62-81a414175e6d8090-01",
"details": {
"entityType": "User",
"entityId": "12345"
}
}

Error Codes

Errors include a code field that can be used to programmatically identify the error.

Below is a list of error codes, along with additional detailed payload (if any) and their descriptions

CodePayloadDescription
entity_not_foundEntityNotFoundThe requested entity does not exist.
not_foundThe requested resource does not exist.
deleted_entity_operationThe requested operation cannot be performed on a deleted entity.
not_deleted_entity_operationThe requested operation cannot be performed on a non-deleted entity.
access_deniedThe user does not have permission to perform the requested operation.
validation_errorThe request data failed validation.
missing_version_headerThe Scale-Version header is missing from the request.
invalid_versionThe version header that is received is not in the list of supported versions.
unsupported_versionThe request version is valid, but the current operation is not supporting this version.
deprecated_versionThe requested version is deprecated and should not be used.
unknown_errorAn unknown error occurred.

Entity Not Found error

Code: entity_not_found.
Type: EntityNotFound.

  • entityType - The type of the entity that was not found.
  • entityId - The identifier of the entity that was requested but not found.