Note: this module is auto published to npm on CircleCI. Only run npm version patch|minor|major
and let CI do the rest.
import createError from '@scipe/create-error';
createError();
createError(404);
createError('not found');
createError(404, 'not found');
import createError from '@scipe/create-error';
import request from 'request';
request('http://example.com/couchdb', (err, resp, body) => {
if (err = createError(err, resp, body)) {
return callback(err);
}
// no error, we can process body
});
@scipe/create-error
is dual-licensed under commercial and open source licenses
(AGPLv3) based on the intended
use case. Contact us to learn which license applies to your use case.