2
1
mirror of https://github.com/Thream/socketio-jwt.git synced 2024-07-21 09:38:31 +02:00
socketio-jwt/lib/UnauthorizedError.js
2020-12-27 17:25:44 +01:00

16 lines
382 B
JavaScript

function UnauthorizedError (code, error) {
Error.call(this, error.message)
this.message = error.message
this.inner = error
this.data = {
message: this.message,
code: code,
type: 'UnauthorizedError'
}
}
UnauthorizedError.prototype = Object.create(Error.prototype)
UnauthorizedError.prototype.constructor = UnauthorizedError
module.exports = UnauthorizedError