2014-01-13 20:00:21 +01:00
|
|
|
function UnauthorizedError (code, error) {
|
2020-12-27 17:25:44 +01:00
|
|
|
Error.call(this, error.message)
|
|
|
|
this.message = error.message
|
|
|
|
this.inner = error
|
2014-07-16 22:12:18 +02:00
|
|
|
this.data = {
|
|
|
|
message: this.message,
|
|
|
|
code: code,
|
2019-10-14 01:46:30 +02:00
|
|
|
type: 'UnauthorizedError'
|
2020-12-27 17:25:44 +01:00
|
|
|
}
|
2014-01-13 20:00:21 +01:00
|
|
|
}
|
|
|
|
|
2020-12-27 17:25:44 +01:00
|
|
|
UnauthorizedError.prototype = Object.create(Error.prototype)
|
|
|
|
UnauthorizedError.prototype.constructor = UnauthorizedError
|
2014-01-13 20:00:21 +01:00
|
|
|
|
2020-12-27 17:25:44 +01:00
|
|
|
module.exports = UnauthorizedError
|