When a /v2 call fails, you get an HTTP error status and a JSON body with the same fields every time. Your code can act on two of them: code tells you the kind of error, and reason tells you exactly what went wrong. The message is only there to help you while you develop.
What an error looks like
This call asks for more SIPs per page than the endpoint allows:
GET /v2/sip?pageSize=5000
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Error-Id: 3f6c2a9e-8b41-4d7a-9c55-2e1f0b7d4a10
{
"code": "VALIDATION_ERROR",
"reason": "OUT_OF_RANGE",
"message": "pageSize must be between 1 and 1000",
"errorId": "3f6c2a9e-8b41-4d7a-9c55-2e1f0b7d4a10",
"params": { "field": "pageSize", "min": 1, "max": 1000 },
"details": [
{
"field": "pageSize",
"reason": "OUT_OF_RANGE",
"message": "pageSize must be between 1 and 1000",
"params": { "field": "pageSize", "min": 1, "max": 1000 }
}
]
}
The error body
|
Field |
Type |
Description |
|---|---|---|
|
|
string |
The kind of error, which matches the HTTP status. See Error codes. |
|
|
string |
What went wrong, exactly. See Reasons. |
|
|
string |
A description in English, for developers. It's never empty. |
|
|
string (UUID) |
The ID of this error. |
|
|
object |
The values that go with the reason, such as a field name or a limit. Only there when the reason has values. |
|
|
array |
One entry per field with a problem, each with its own |
What your code can rely on
-
Switch on
reasonto handle a specific error, or to show your own text to your users. Fill in your text with the values inparams. -
Fall back to
codefor a reason that your code doesn't know. -
Use
detailsto mark the fields with a problem, for example in a form. When several fields fail at once,detailslists each field, and the top-levelreasonisINVALID_REQUEST, except forMUTUALLY_EXCLUSIVE_FIELDS, which keeps its own. -
Don't parse
message. Its text can change, and for a server error it's only a general description.
When you ask Docbyte about a failed call, send the errorId. The same ID is in the archive's logs.
Error codes
|
|
HTTP status |
What it means |
|---|---|---|
|
|
|
Something in your request isn't valid. |
|
|
|
Your request body, or a value in it, is too large. |
|
|
|
The archive couldn't authenticate you. |
|
|
|
You're authenticated, but you can't do this. |
|
|
|
What you asked for doesn't exist, or you can't see it. |
|
|
|
The action conflicts with the current state of the resource. |
|
|
|
What you asked for isn't available anymore. |
|
|
|
The |
|
|
|
A service that the call needs isn't available. |
|
|
|
Something went wrong on the server. |
A few errors keep an HTTP status that isn't the default for their code. For example, a request with an unsupported Content-Type gets a 415 status with the code VALIDATION_ERROR. Use the HTTP status to see that a call failed, and use code and reason to decide what to do.
Reasons
Validation errors (400)
|
|
What it means for you |
|---|---|
|
|
The request isn't valid. Check |
|
|
A required field is missing. |
|
|
A field has a value that isn't allowed. |
|
|
A number or a length is outside its limits. |
|
|
A value doesn't have the expected format, for example an email address. |
|
|
A date isn't a valid ISO 8601 date. For the formats that you can use, see General information. |
|
|
A schedule isn't a valid cron expression. |
|
|
|
|
|
A field has a value that the endpoint doesn't support. |
|
|
You sent fields that can't go together. |
|
|
The package ID has characters that aren't allowed. |
|
|
A value in the JSON body has the wrong type, or the body can't be read. |
|
|
The query criteria of a search or a report aren't valid. |
|
|
A query rule, or a |
|
|
A query rule uses an operator that doesn't work on its field. |
|
|
The archive doesn't know the metadata schema. |
|
|
A metadata document doesn't match its schema. |
|
|
The package doesn't have a value for the metadata field. |
|
|
The report type doesn't support the output format. |
The archive only checks metadata documents against their schema in environments where that's turned on, and it's off by default. Everywhere else, you don't get METADATA_INVALID.
Request too large (413)
|
|
What it means for you |
|---|---|
|
|
The request body is larger than the maximum size. |
|
|
One value in the JSON body is longer than the maximum length. |
For the limits, see General information.
Authentication errors (401)
|
|
What it means for you |
|---|---|
|
|
The request has no token, or the token has expired, isn't valid, or has no |
|
|
The archive rejected your token after the API accepted it. Get a new token. If it keeps happening, ask Docbyte. |
To get a token, go to Authentication.
Permission errors (403)
|
|
What it means for you |
|---|---|
|
|
You can't do this. Your client doesn't have the role that the endpoint needs, it doesn't have the permission on the package, or the |
|
|
Your client can find the package, but it isn't allowed to open it. |
|
|
An Adobe Acrobat Sign webhook call came with a client ID that doesn't match the one set up for your archive. |
Not found (404)
|
|
What it means for you |
|---|---|
|
|
The path or the resource doesn't exist, or your client can't see it. |
|
|
No package has the ID in |
|
|
No package set has the ID in |
|
|
No user has the ID in |
|
|
No role has the name in |
|
|
The search configuration doesn't exist. |
|
|
No preservation schedule has the ID in |
|
|
The audit trail has no event with the ID in |
|
|
No running or finished job has the ID in |
|
|
The file, the download link, or the uploaded file that you refer to doesn't exist. |
|
|
The archive has no metadata template for the schema in |
Conflicts (409)
|
|
What it means for you |
|---|---|
|
|
The action doesn't fit the current state of the resource, for example a review of a deletion list that isn't ready for review. |
|
|
A user with this username already exists. |
|
|
The package already has a submission with this name. Use a new file name. |
|
|
The package was already transferred to the tenant in |
|
|
You can't delete the retention rule, because packages still use it. |
|
|
The package is under a legal hold, so you can't change it. |
|
|
The package is under retention, so you can't change it. |
|
|
The archive is still processing the package, so it can't update single metadata fields now. Try again in a moment, or send the complete metadata document instead. |
Gone (410)
|
|
What it means for you |
|---|---|
|
|
The download link has expired. To get a new link, get the package again with the |
Range not satisfiable (416)
|
|
What it means for you |
|---|---|
|
|
The |
Service unavailable (503)
|
|
What it means for you |
|---|---|
|
|
The archive is unavailable for a moment. Try again later. The response has no |
Server errors (500)
|
|
What it means for you |
|---|---|
|
|
Something went wrong in the API. |
|
|
The archive couldn't process the request. |
|
|
A service outside the archive, such as an e-signature service, couldn't process the request. |
Reasons in an ingest status
An ingest runs after the call returns, so a failed ingest doesn't come back as an HTTP error. Instead, the SIP and the ingest status get a failureReason field. It can hold the reasons above that apply, such as SUBMISSION_ALREADY_EXISTS, PERMISSION_DENIED, and CONTENT_NOT_FOUND, and these reasons that only appear here:
-
SIP_INVALID: the package isn't a valid SIP. -
PROFILE_DISABLED: the archiving profile is turned off. -
PROFILE_NOT_FOUND: the archiving profile doesn't exist. -
INGEST_FAILED: the ingest failed for another reason.
To follow an ingest, go to Ingest API.
Errors on the v1 and x19512 APIs
The v1 and x19512 APIs keep their older error body, with only code and message, and no X-Error-Id header:
{
"code": "NO_PERMISSION",
"message": "No permissions to perform this action"
}
They also keep their older codes: VALIDATION_ERROR, JSON_TOO_LARGE, NOT_AUTHORIZED, NO_PERMISSION, NO_ACCESS, NOT_FOUND, CONFLICT, and EXCEPTION. For a server error, the message holds the error ID, for example Internal server error. Error id: 3f6c2a9e-8b41-4d7a-9c55-2e1f0b7d4a10.