getAllErrorCodes

errors · /index·function

Returns all error code string values across every enum in in a single flat array.

Signature

@nordcom/commerce-errors
function getAllErrorCodes(): any[];

Returns

An array of every registered *ErrorKind string value.

Example

const codes = getAllErrorCodes();
// ['GENERIC_UNKNOWN_ERROR', 'GENERIC_TODO', ..., 'API_UNKNOWN_ERROR', ...]

ApiErrorKind GenericErrorKind ApiError CartNotFoundError CartProviderError CartUserError ConvexOperatorTokenMintError DomainVerificationError

Sourceindex.ts:1514Edit the JSDoc directly
Metadata@nordcom/commerce-errors@0.0.0Open in GitHub ↗

On this page