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