Peak problem types
Home / Shared

Shared problem types

Every Peak service answers with these, beside its own types, as Peak.Problems 2.0.0 declares them.

Types without a page

Their type is about:blank (RFC 9457 section 4.2.1): they mean nothing beyond their HTTP status, so they have no page of their own. A client tells them apart by code.

unauthorized 401 Unauthorized, audience client
The request carries no credential, or one the service does not accept (expired, revoked, for another audience). Its type is about:blank: it means nothing beyond the 401 status. Obtain a fresh credential (refresh the token, sign in again) and send the request again.
forbidden 403 Forbidden, audience client
The credential is valid but does not allow this request: the caller lacks the role, scope or ownership it needs. Its type is about:blank: it means nothing beyond the 403 status. Signing in again does not help; the caller needs the permission.
not_found 404 Not Found, audience client
The route does not exist, or the resource it names does not exist or is not visible to the caller. Its type is about:blank: it means nothing beyond the 404 status. A resource a client must tell apart from a wrong address (a listing that was taken down) has a type of its own.
method_not_allowed 405 Method Not Allowed, audience client
The route exists but does not take the request's HTTP method; the Allow header lists the methods it takes. Its type is about:blank: it means nothing beyond the 405 status. A correct client never sends it.
internal_error 500 Internal Server Error, audience client
A fault of the service itself, not of the request. Its type is about:blank: it means nothing beyond the 500 status. Whether anything was changed is not known; read the state before repeating a write that is not idempotent. Show a general failure and quote traceId to support, who find the fault by it.

Shared rule codes

The codes of errors entries every service uses. All rule codes are on one page.

incompatible
A value that does not go with another value of the same request; the entry points at the one to change.
invalid
A value has the wrong form: it does not match the pattern or format the rule requires.
off_step
A number lies between the steps the value may take (a whole number where a fraction was given, a multiple of a step).
out_of_range
A number lies outside minimum..maximum; either bound may be absent when the range is open on that side.
required
No value was given where the rule needs one.
too_few
A list has fewer items than minimum requires.
too_long
A text has more characters than maximum allows.
too_many
A list has more items than maximum allows.
too_short
A text has fewer characters than minimum requires.
unavailable
A value that is taken by someone else or not offered here.
unknown
A name, id or member the service does not have: a reference to something that does not exist or is not visible to the caller.
unreadable
A value that could not be read as its type (text where a number belongs). Written for developers: a correct client never sends it.