fruitstand
Version:
24 lines (20 loc) • 448 B
JavaScript
/**
* `AuthenticationError` error.
*
* @api private
*/
function AuthenticationError(message, status) {
Error.call(this);
Error.captureStackTrace(this, arguments.callee);
this.name = 'AuthenticationError';
this.message = message;
this.status = status || 401;
}
/**
* Inherit from `Error`.
*/
AuthenticationError.prototype.__proto__ = Error.prototype;
/**
* Expose `AuthenticationError`.
*/
module.exports = AuthenticationError;