UNPKG

azurite

Version:

An open source Azure Storage API compatible server

29 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class MiddlewareError extends Error { /** * Creates an instance of MiddlewareError. * * @param {number} statusCode HTTP response status code * @param {string} message Error message * @param {string} [statusMessage] HTTP response status message * @param {OutgoingHttpHeaders} [headers] HTTP response headers * @param {string} [body] HTTP response body * @param {string} [contentType] HTTP contentType * @memberof MiddlewareError */ constructor(statusCode, message, statusMessage, headers, body, contentType) { super(message); this.statusCode = statusCode; this.message = message; this.statusMessage = statusMessage; this.headers = headers; this.body = body; this.contentType = contentType; // https://stackoverflow.com/questions/31626231/custom-error-class-in-typescript Object.setPrototypeOf(this, MiddlewareError.prototype); this.name = "MiddlewareError"; } } exports.default = MiddlewareError; //# sourceMappingURL=MiddlewareError.js.map