Skip to content

fatfisz/forbidden-error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ForbiddenError

When you can't get something

Dependency Status devDependency Status

An exception for use in certain situations (e.g. to signal HTTP 403 error). Created because of a need for a cross-package standard exception.

Getting started

Install the package with this command:

npm install forbidden-error --save

Usage

// Import ES6-style
import ForbiddenError from 'forbidden-error';

// Or CommonJS-style
const ForbiddenError = require('forbidden-error');

// Then just use like this:
throw new ForbiddenError();

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style.

License

Copyright (c) 2016 Rafał Ruciński. Licensed under the WTFPL license.

About

A simple ForbiddenError constructor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published