This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@maxtruxa/http-error

0.1.2 • Public • Published

@maxtruxa/http-error

npm Version npm Downloads Test Status Test Coverage MIT Licensed

HttpError.

This README needs some love.

const HttpError = require('@maxtruxa/http-error');

throw new HttpError(404, {url: 'https://example.com/test'});

Installing

npm install @maxtruxa/http-error

Features

Usage

Direct Usage

const HttpError = require('@maxtruxa/http-error');

// HttpError(code[, message][, properties])
// HttpError(properties)

throw new HttpError(404);
throw new HttpError(404, 'some message');
throw new HttpError(404, {additional: 'information'});
throw new HttpError(404, 'some message', {additional: 'information'});
throw new HttpError({code: 404, additional: 'information'});

Inheriting

API

Tests

To run the test suite, install dependencies, then run npm test:

npm install
npm test

Coverage reports are generated by running npm run coverage. Linting is done with npm run lint.

Readme

Keywords

Package Sidebar

Install

npm i @maxtruxa/http-error

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

7.88 kB

Total Files

5

Last publish

Collaborators

  • maxtruxa