@coko/server
Version:
Reusable server for use by Coko's projects
15 lines • 581 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const http_status_codes_1 = require("http-status-codes");
class AuthenticationError extends Error {
status;
constructor(message, status) {
super(message);
Error.captureStackTrace(this, AuthenticationError);
this.name = 'AuthenticationError';
this.message = `AuthenticationError: ${message}`;
this.status = status || http_status_codes_1.StatusCodes.UNAUTHORIZED;
}
}
exports.default = AuthenticationError;
//# sourceMappingURL=AuthenticationError.js.map