Files
jose/docs/classes/util_errors.JOSEError.md

1.1 KiB

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.


A generic Error that all other JOSE specific Error subclasses extend.

Example

Checking thrown error is a JOSE one

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

Table of contents

Constructors

Properties

Accessors

Constructors

constructor

• new JOSEError(message?)

Parameters

Name Type
message? string

Properties

code

• code: string = 'ERR_JOSE_GENERIC'

A unique error code for the particular error subclass.

Accessors

code

• Static get code(): string

A unique error code for the particular error subclass.

Returns

string