UNPKG

@rafat97/exceptionhandler

Version:

All types exception handler classes definition

26 lines 924 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ForbiddenException = void 0; const CustomError_1 = require("./CustomError"); /* 403 Forbidden The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. */ class ForbiddenException extends CustomError_1.CustomError { constructor(message = "Forbidden") { super(message); this.message = message; this.statusCode = 403; Object.setPrototypeOf(this, ForbiddenException.prototype); } getStatusCode() { return this.statusCode; } serializeErrors() { return { message: this.message, details: [] }; } } exports.ForbiddenException = ForbiddenException; //# sourceMappingURL=ForbiddenException.js.map