UNPKG

@rafat97/exceptionhandler

Version:

All types exception handler classes definition

20 lines 706 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnauthorizedException = void 0; const CustomError_1 = require("./CustomError"); class UnauthorizedException extends CustomError_1.CustomError { constructor(message = "Unauthorized") { super(message); this.message = message; this.statusCode = 401; Object.setPrototypeOf(this, UnauthorizedException.prototype); } getStatusCode() { return this.statusCode; } serializeErrors() { return { message: this.message, details: [] }; } } exports.UnauthorizedException = UnauthorizedException; //# sourceMappingURL=UnauthorizedException.js.map