Skip to content

errors

Machine-readable error codes shared between the API server and clients.

Every structured error response from the API carries one of these codes in its code field (see yousleep_common.models.errors.ErrorResponse), so clients can branch on error semantics without parsing human-readable detail text. The same vocabulary is used by the batch endpoints' per-item errors (BatchItemError.code), which additionally use the batch-only codes at the end of the enum for outcomes that only exist inside a multi-item request.

ErrorCode

Bases: str, Enum

Canonical machine-readable API error codes.