UNPKG

@neylion/exceptions

Version:

Exceptions commonly used within ney projects

16 lines (15 loc) 618 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Exception_1 = require("./Exception"); class NotFoundException extends Exception_1.Exception { constructor(message, errorCode = null, innerException) { super(message, innerException); this.name = "NotFoundException"; this.statusCode = 404; this.errorCode = errorCode ? Number(errorCode) : undefined; this.type = "notFound"; this.typeDescription = "An entity that was expected to be found was not."; delete this.location; } } exports.NotFoundException = NotFoundException;