UNPKG

@nasriya/hypercloud

Version:

Nasriya HyperCloud is a lightweight Node.js HTTP2 framework.

20 lines (19 loc) 552 B
/** * This error gets thrown as a result of an error in one of the middleawres * and is catched by the `onHTTPError` handler. */ class HTTPError extends Error { /**The name of the error */ name = 'HTTPError'; /**The request where the error got thrown from */ request; /**The Date & Time of the error in ISO string format */ time = new Date().toISOString(); error; constructor(data) { super(data.message); this.request = data.request; this.error = data.error; } } export default HTTPError;