Add a NotAuthorized error object

This commit is contained in:
Aron Carroll 2012-06-22 15:28:16 +01:00
parent 684bdba638
commit 27913871e1

View File

@ -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);
}