This repository has been archived on 2024-11-11. You can view files and clone it, but cannot push or open issues or pull requests.
socketio-jwt/lib/UnauthorizedError.js

16 lines
382 B
JavaScript
Raw Normal View History

function UnauthorizedError (code, error) {
2020-12-27 17:25:44 +01:00
Error.call(this, error.message)
this.message = error.message
this.inner = error
this.data = {
message: this.message,
code: code,
type: 'UnauthorizedError'
2020-12-27 17:25:44 +01:00
}
}
2020-12-27 17:25:44 +01:00
UnauthorizedError.prototype = Object.create(Error.prototype)
UnauthorizedError.prototype.constructor = UnauthorizedError
2020-12-27 17:25:44 +01:00
module.exports = UnauthorizedError