2
1
mirror of https://github.com/Thream/socketio-jwt.git synced 2024-11-09 22:20:08 +01:00
socketio-jwt/lib/UnauthorizedError.js

15 lines
388 B
JavaScript
Raw Normal View History

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;