Skip to content

ErrorCode

ErrorCode: object

Defined in: packages/core/src/errors.ts:9

Companion object for the ErrorCode type. Provides category helpers for error classification in monitoring and alerting.

readonly isAuth: (code) => boolean

Whether the error code represents an authentication failure.

ErrorCode

the error code to check

boolean

true if the code is an auth error

readonly isClientError: (code) => boolean

Whether the error code represents a client-side error (validation, not found).

ErrorCode

the error code to check

boolean

true if the code is a client error

readonly isNetwork: (code) => boolean

Whether the error code represents a network-level failure.

ErrorCode

the error code to check

boolean

true if the code is a network error

readonly isRateLimit: (code) => boolean

Whether the error code represents a rate limiting issue.

ErrorCode

the error code to check

boolean

true if the code is a rate limit error

if (ErrorCode.isNetwork(error.code)) { ... }