@bluejay/rest-errors
v4.0.2
Published
Errors with status codes and more.
Downloads
1,561
Readme
RestErrors
Rest oriented set of errors.
Requirements
node >= 8.6
, tested with:[email protected]
[email protected]
typescript >= 4.0
, tested with:[email protected]
Installation
npm i @bluejay/rest-errors
;
Usage
import * as RestErrors from '@bluejay/rest-errors';
const err = new RestErrors.BadRequest('Something went wrong.', { some: { meta: 'data' } });
RestErrors.isRestError(err); // true
Documentation
See Github Pages.