Error Messages

The following table describes three fields for error messages that can be returned when you send requests to the REST API for Documents.

Error Message Field Description of Error Message Field
errorCode A numeric value: 0 means there is no error. An error value is a number between -1 and -99.
errorKey A system-parsable key that indicates the type of error.
errorMessage A user-readable message describing the error. The language of this message can be altered by setting the Accept-Language header.

Error Codes

Some status codes are accompanied by a fault response body to help you diagnose the issue.

The following table describes general error codes returned by the errorCode field in the fault response body for an action. The errorMessage field in the response provides a more detailed description of the error.

Error Code Description

0

The action was successful.

-1

General failure. This code is returned when a more specific status code is not available.

-16

A folder or file with the specified name or ID does not exist in the specified location. This is typically returned as an HTTP 404 response code.

-17

A folder or file with the same name already exists in the target location.

-20

The user does not have sufficient privileges to perform the requested operation. This is typically returned as an HTTP 403 response code.

-26

The link is invalid or expired. This is typically returned as an HTTP 400 response code.

The following example shows the error code and message portion of a response:

{
    "errorCode": "-16",
    "errorMessage": "Security validation failed. 'FABCDEFGHIJKLMNOPQRSTUVWT0000000000100000001' does not exist. The error was caused by an internally generated issue. The error has been logged."
}