Skip to main content

Module error

Module error 

Source
Expand description

The error every call can answer with, its categories, and the exit status each maps to.

Structs§

Error
The error every SDK call can answer with.

Enums§

ErrorCode
Machine-readable error categories, shared with the other HEY SDKs.

Constants§

EXIT_AMBIGUOUS
A name matched more than one record.
EXIT_API
The server returned an error.
EXIT_AUTH
Not authenticated.
EXIT_FORBIDDEN
Access denied, usually a scope the token does not carry.
EXIT_NETWORK
Connection, DNS or timeout failure.
EXIT_NOT_FOUND
Resource not found.
EXIT_OK
The call succeeded.
EXIT_RATE_LIMIT
Rate limited (429).
EXIT_USAGE
Invalid arguments or flags.
EXIT_VALIDATION
The server rejected the contents of the request (422), or the request conflicts with the state the server already holds (409).
MAX_ERROR_BODY_BYTES
The most of a failure’s body an error keeps, mirroring Go’s MaxErrorBodyBytes. A body past it is kept up to the bound and no further: an error is diagnostic, and a server answering a refusal with a megabyte of anything has said everything useful long before.
MAX_ERROR_MESSAGE_BYTES
The most of a server’s own message an error’s hint carries, mirroring Go’s MaxErrorMessageBytes. A longer one is cut and ends in ....