Skip to content

Commit

Permalink
acl: fixed HttpError message reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
nemtsov committed Aug 22, 2015
1 parent a4daec4 commit a33d622
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/acl.js
Original file line number Diff line number Diff line change
Expand Up @@ -589,13 +589,14 @@ Acl.prototype.middleware = function(numPathComponents, userId, actions){

var acl = this;

var HttpError = function(errorCode, msg){
function HttpError(errorCode, msg){
this.errorCode = errorCode;
this.msg = msg;
this.message = msg;
this.name = this.constructor.name;

Error.captureStackTrace(this, arguments);
Error.call(this, msg);
};
Error.captureStackTrace(this, this.constructor);
this.constructor.prototype.__proto__ = Error.prototype;
}

return function(req, res, next){
var _userId = userId,
Expand Down

0 comments on commit a33d622

Please sign in to comment.