UNPKG

ramses-auth

Version:

RAMSES - Robust Access Model for Securing Exposed Services

15 lines (12 loc) 421 B
function UnauthorizedError(code, error) { this.name = "UnauthorizedError"; this.message = error.message; Error.call(this, error.message); Error.captureStackTrace(this, this.constructor); this.code = code; this.status = 401; this.inner = error; } UnauthorizedError.prototype = Object.create(Error.prototype); UnauthorizedError.prototype.constructor = UnauthorizedError; module.exports = UnauthorizedError;