Skip to main content
Version: 2025-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

CodeDescription
access_deniedThe user does not have permission to perform the requested operation.
deleted_entity_operationThe requested operation cannot be performed on a deleted entity.
deprecated_versionThe requested version is deprecated and should not be used.
entity_not_foundThe requested entity does not exist. See the EntityNotFound object in the response for additional details.
invalid_username_or_passwordThe username or password provided in the request are invalid.
invalid_versionThe version header that is received is not in the list of supported versions.
missing_version_headerThe Scale-Version header is missing from the request.
not_deleted_entity_operationThe requested operation cannot be performed on a non-deleted entity.
not_foundThe requested resource does not exist.
too_many_requestsToo many requests were sent in a given amount of time. See Rate Limiting for more information.
too_many_results_foundToo many results found. Please narrow down your search criteria.
unit_does_not_belong_to_siteThe specified unit does not belong to the specified site.
unknown_errorAn unknown error occurred.
unsupported_versionThe request version is valid, but the current operation is not supporting this version.
validation_errorThe request data failed validation.

Entity Not Found error

Code: entity_not_found.

Additional details in the response include:

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