Back to Jose

Class: JOSEAlgNotAllowed

docs/util/errors/classes/JOSEAlgNotAllowed.md

6.2.2793 B
Original Source

Class: JOSEAlgNotAllowed

šŸ’— 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.

An error subclass thrown when a JOSE Algorithm is not allowed per developer preference.

Examples

Checking thrown error is this one using a stable error code

js
if (err.code === 'ERR_JOSE_ALG_NOT_ALLOWED') {
  // ...
}

Checking thrown error is this one using instanceof

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

Properties

code

• code: string = 'ERR_JOSE_ALG_NOT_ALLOWED'

A unique error code for JOSEAlgNotAllowed.