@heviir/http-errors
v1.0.3
Published
http errors
Downloads
13
Readme
http-errors
import httpErrors from 'http-errors';
const data = {}; // optional
const err = new httpErrors.Unauthorized(data);
err.code; // 401
err.message; // "Unauthorized"
err.type; // "Unauthorized"
err.data; // data
new httpErrors.GatewayTimeout().message; // "Gateway Timeout"