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
Fabian Arndt 8f2b55a7aa Fixed travis
- Tests against Node 4, 8, 10, 12 and newest

Modernized:
- Use arrow functions
- Use string templates in examples and some code
- Use single quote for strings
2019-10-14 01:46:30 +02:00

15 lines
388 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;