import { OutgoingHttpHeaders } from "http" ; export default class MiddlewareError extends Error { param { number } statusCode param { string } message param { string } statusMessage param { OutgoingHttpHeaders } headers param { string } body param { string } contentType memberof constructor ( public readonly statusCode , public readonly message , public readonly statusMessage ? , public readonly headers ? , public readonly body ? , public readonly contentType ? ) { super ( message ) ; Object . setPrototypeOf ( this , MiddlewareError . prototype ) ; this . name = "MiddlewareError" ; } }