Fix various error codes

401 - bad password/wrong password
403 - authenticated but not authorized
409 - conflict
This commit is contained in:
Girish Ramakrishnan
2018-06-15 20:51:26 -07:00
parent 24b0a96f07
commit e8d9597345
9 changed files with 19 additions and 19 deletions

View File

@@ -153,7 +153,7 @@ function websocketAuth(requiredScopes, req, res, next) {
req.authInfo = info;
var e = accesscontrol.hasScopes(req.authInfo, requiredScopes);
if (e) return next(new HttpError(401, e.message));
if (e) return next(new HttpError(403, e.message));
next();
});