UNPKG

@neylion/exceptions

Version:

Exceptions commonly used within ney projects

15 lines (14 loc) 552 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Exception_1 = require("./Exception"); class UnauthorizedException extends Exception_1.Exception { constructor() { super("Missing or invalid authorization."); this.name = "UnauthorizedException"; this.statusCode = 401; this.type = "unauthorized"; this.typeDescription = "Request had invalid, insufficient or missing authorization."; delete this.location; } } exports.UnauthorizedException = UnauthorizedException;