mirror of
https://github.com/jsbin/jsbin.git
synced 2026-02-01 16:46:05 +00:00
Add a NotAuthorized error object
This commit is contained in:
parent
684bdba638
commit
27913871e1
@ -22,6 +22,13 @@ NotFound.prototype = Object.create(HTTPError.prototype);
|
||||
|
||||
module.exports.NotFound = NotFound;
|
||||
|
||||
function NotAuthorized(message) {
|
||||
Error.call(this, 401, message);
|
||||
}
|
||||
NotAuthorized.prototype = Object.create(HTTPError.prototype);
|
||||
|
||||
module.exports.NotFound = NotFound;
|
||||
|
||||
function BadRequest(message) {
|
||||
HTTPError.call(this, 400, message);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user