unleash-server
Version:
Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.
25 lines • 696 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class UsedTokenError extends Error {
constructor(usedAt) {
super();
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = `Token was already used at ${usedAt}`;
}
toJSON() {
const obj = {
isJoi: true,
name: this.constructor.name,
details: [
{
message: this.message,
},
],
};
return obj;
}
}
exports.default = UsedTokenError;
module.exports = UsedTokenError;
//# sourceMappingURL=used-token-error.js.map