Skip to main content

Errors

When a request fails, the API answers with a problem document (RFC 9457) and Content-Type: application/problem+json.

The code member is the one to act on. The title and detail members are text for people: they follow the Accept-Language header (English, Japanese or Vietnamese), and Content-Language says which language was used.

The problem document​

FieldDescription
typehttps://docs.docwize.com/api/errors/{code}, the page of the code on this site.
titleThe title of the code, in the response language.
statusThe HTTP status, the same as the response's.
codeThe problem code. The codes are listed below.
detailWhat went wrong in this request, in the response language.
request_idThe ID of the request. Quote it when you report a problem.
errorsOnly on 422: one entry per invalid part of the request, with in (body, query, path or header), pointer, code and message.

Some codes add members of their own, for example scope on insufficient_scope and base_url on wrong_region. Their pages say so.

Problem codes​

CodeStatusTitle
invalid_version400Invalid version
malformed_json400Malformed JSON
token_expired401Token expired
unauthenticated401Unauthenticated
forbidden403Forbidden
insufficient_scope403Insufficient scope
token_owner_inactive403Token owner inactive
not_found404Not found
method_not_allowed405Method not allowed
not_acceptable406Not acceptable
already_exists409Already exists
conflict409Conflict
idempotency_in_progress409Request in progress
in_use409In use
locked409Locked
cursor_expired410Cursor expired
task_expired410Task expired
precondition_failed412Precondition failed
payload_too_large413Payload too large
response_too_large413Response too large
unsupported_media_type415Unsupported media type
wrong_region421Wrong region
idempotency_key_reused422Idempotency key reused
invalid_cursor422Invalid cursor
unsupported_for_tenant422Unsupported for this company
validation_failed422Validation failed
rate_limited429Too many tool calls
internal_error500Internal error
not_attempted503Not attempted
tenant_unavailable503Company database unavailable
unavailable503Unavailable
timeout504Timeout

Field codes​

The code of each errors entry is one of these. The message shown is the default message; a word in braces is filled in.

CodeDefault message
duplicate{field} is given more than once.
invalid_character{field} contains a NUL character.
invalid_choice{field} must be one of: {choices}.
invalid_date{field} must be a date (YYYY-MM-DD).
invalid_decimal{field} must be a decimal number{scale_hint}.
invalid_format{field} has the wrong format: {expected}.
invalid_type{field} must be {expected}.
out_of_range{field} is out of range.
read_only{field} is read-only and cannot be changed.
reference_forbidden{field}: you cannot use {id}; {reason}
reference_not_found{field}: {id} does not exist.
reference_unverifiable{field}: {id} cannot be checked because {reason}.
required{field} is required.
unknown_field{field} is not a known field.
value_too_long{field} is {actual_length} characters; the limit is {max_length}.