Back to Jose

util/errors

docs/util/errors/README.md

6.2.122.4 KB
Original Source

util/errors

JOSE module errors and error codes

These are exported (as the errors namespace) from the main 'jose' module entry point as well as from the subpath export 'jose/errors'.

Classes

ClassDescription
JOSEAlgNotAllowedThrown when an algorithm is disallowed by configuration.
JOSEErrorBase class for JOSE errors.
JOSENotSupportedThrown when a feature or algorithm is unsupported.
JWEDecryptionFailedThrown when JWE ciphertext decryption or authentication fails.
JWEInvalidThrown when a JWE is invalid.
JWKInvalidThrown when a JWK is invalid.
JWKSInvalidThrown when a JWKS is invalid.
JWKSMultipleMatchingKeysThrown when multiple keys match in a JWKS.
JWKSNoMatchingKeyThrown when no keys match in a JWKS.
JWKSTimeoutThrown when fetching a remote JWKS times out.
JWSInvalidThrown when a JWS is invalid.
JWSSignatureVerificationFailedThrown when JWS signature verification fails.
JWTClaimValidationFailedThrown when JWT claim or header validation fails. Expiration is reported separately as JWTExpired.
JWTExpiredThrown when a JWT has expired or exceeds the configured maximum token age.
JWTInvalidThrown when a JWT is invalid.

Interfaces

InterfaceDescription
JWTClaimValidationFailureShared details of JWT claim or header validation failures.

Type Aliases

Type AliasDescription
AnyJOSEErrorDiscriminated union of specific JOSEError subclasses, narrowed by code. Excludes base JOSEError instances; use instanceof JOSEError to catch all module errors.
JOSEErrorCodeStable error codes used by this module.
JWTClaimValidationErrorErrors thrown during JWT Claims Set validation.