embassy
Version:
Simple JSON Web Tokens (JWT) with embedded scopes for services
24 lines • 707 B
JavaScript
;
/*
* Embassy
* Copyright (c) 2017-2021 Tom Shawver
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyNotFoundError = void 0;
/**
* Thrown when attempting to sign or verify a token with an unknown key ID that
* cannot be resolved to a key.
*
* Sets a `status` property to 401 so this error can be treated as an HTTP error
* for convenience.
*/
class KeyNotFoundError extends Error {
constructor(message) {
super(message);
this.status = 401;
this.name = this.constructor.name;
Error.captureStackTrace(this, this.constructor);
}
}
exports.KeyNotFoundError = KeyNotFoundError;
//# sourceMappingURL=KeyNotFoundError.js.map