mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
15 lines
422 B
JavaScript
15 lines
422 B
JavaScript
|
// # Token Revocation ERror
|
||
|
// Custom error class with status code and type prefilled.
|
||
|
|
||
|
function TokenRevocationError(message) {
|
||
|
this.message = message;
|
||
|
this.stack = new Error().stack;
|
||
|
this.statusCode = 503;
|
||
|
this.errorType = this.name;
|
||
|
}
|
||
|
|
||
|
TokenRevocationError.prototype = Object.create(Error.prototype);
|
||
|
TokenRevocationError.prototype.name = 'TokenRevocationError';
|
||
|
|
||
|
module.exports = TokenRevocationError;
|