Back to Jose

Class: JOSEError

docs/util/errors/classes/JOSEError.md

6.2.12641 B
Original Source

Class: JOSEError

šŸ’— Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.

Base class for JOSE errors.

Example

Checking thrown error is a JOSE one

js
if (err instanceof jose.errors.JOSEError) {
  // ...
}

Properties

code

• code: string = 'ERR_JOSE_GENERIC'

Stable code identifying the error class. Use AnyJOSEError to narrow subclasses by code.