docs/util/errors/README.md
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'.
| Class | Description |
|---|---|
| JOSEAlgNotAllowed | Thrown when an algorithm is disallowed by configuration. |
| JOSEError | Base class for JOSE errors. |
| JOSENotSupported | Thrown when a feature or algorithm is unsupported. |
| JWEDecryptionFailed | Thrown when JWE ciphertext decryption or authentication fails. |
| JWEInvalid | Thrown when a JWE is invalid. |
| JWKInvalid | Thrown when a JWK is invalid. |
| JWKSInvalid | Thrown when a JWKS is invalid. |
| JWKSMultipleMatchingKeys | Thrown when multiple keys match in a JWKS. |
| JWKSNoMatchingKey | Thrown when no keys match in a JWKS. |
| JWKSTimeout | Thrown when fetching a remote JWKS times out. |
| JWSInvalid | Thrown when a JWS is invalid. |
| JWSSignatureVerificationFailed | Thrown when JWS signature verification fails. |
| JWTClaimValidationFailed | Thrown when JWT claim or header validation fails. Expiration is reported separately as JWTExpired. |
| JWTExpired | Thrown when a JWT has expired or exceeds the configured maximum token age. |
| JWTInvalid | Thrown when a JWT is invalid. |
| Interface | Description |
|---|---|
| JWTClaimValidationFailure | Shared details of JWT claim or header validation failures. |
| Type Alias | Description |
|---|---|
| AnyJOSEError | Discriminated union of specific JOSEError subclasses, narrowed by code. Excludes base JOSEError instances; use instanceof JOSEError to catch all module errors. |
| JOSEErrorCode | Stable error codes used by this module. |
| JWTClaimValidationError | Errors thrown during JWT Claims Set validation. |