add data to UnauthorizedError so that more information can be returned to client

This commit is contained in:
Vadim Kazakov
2014-07-16 14:12:18 -06:00
parent 870a274be9
commit 139843467b
2 changed files with 7 additions and 2 deletions

View File

@ -16,7 +16,8 @@ describe('authorizer', function () {
});
socket.on('error', function(err){
err.should.eql("Invalid token: no header in signature 'boooooo'");
err.message.should.eql("Invalid token: no header in signature 'boooooo'");
err.code.should.eql("invalid_token");
done();
});
});