Errors · RFC 9457

Error types

The type of each error a Lantern server returns, from the specification's § 10.

Every error a Lantern server returns is application/problem+json (RFC 9457) with a real status code. Its type is one of these addresses, https://lantern.boreale.dev/errors/<name>; its code is the same name in snake case. The specification, § 10.

TypeStatuscodeWhen
bad-request400bad_requestA malformed query or body; a cursor or since token the server never gave
unauthorized401unauthorizedNo token where one is needed, or an unknown, revoked or expired one (with WWW-Authenticate: Bearer)
forbidden403forbiddenA scope missing
account-frozen403account_frozenA frozen account
not-found404not_found—
bad-request405bad_requestA method the route does not take (with Allow)
conflict409conflict—
gone410goneAn expired cursor, since token, pairing or file id
too-large413too_largeA save above the server's limit
bad-request416bad_requestA range outside the file (with Content-Range: bytes */<size>)
unsupported-schema422unsupported_schemaA request document of a schema the server cannot read
slow-down429slow_downToo many requests, pairing attempts or polls (with Retry-After)
internal500internalA failure of the server itself; the client may try again later
unavailable503unavailableScanning, maintenance (with Retry-After)

detail is for people: a client shows it, bounded and without control characters.