UNPKG

embassy

Version:

Simple JSON Web Tokens (JWT) with embedded scopes for services

23 lines 668 B
"use strict"; /* * Embassy * Copyright (c) 2017-2021 Tom Shawver */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TokenParseError = void 0; /** * Thrown when Token fails to parse a string token passed to its constructor. * * Sets a `status` property to 401 so this error can be treated as an HTTP error * for convenience. */ class TokenParseError extends Error { constructor(message) { super(message); this.status = 401; this.name = this.constructor.name; Error.captureStackTrace(this, this.constructor); } } exports.TokenParseError = TokenParseError; //# sourceMappingURL=TokenParseError.js.map