UNPKG

@wennals/common

Version:

16 lines (15 loc) 548 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AuthenticationError = void 0; const custom_error_1 = require("./custom-error"); class AuthenticationError extends custom_error_1.CustomError { constructor() { super('Unauthenticated user. Please login and try again.'); this.statusCode = 401; Object.setPrototypeOf(this, AuthenticationError.prototype); } serializeErrors() { return [{ message: this.message }]; } } exports.AuthenticationError = AuthenticationError;