From 798a146866aeb3c4cdf6b7a053bb3f2c0e19060c Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel Date: Fri, 8 Jun 2012 17:21:31 +0300 Subject: [PATCH] fix a couple typos in request error handling --- lib/browserid/views.js | 2 +- lib/wsapi/stage_user.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/browserid/views.js b/lib/browserid/views.js index 1fc696fb6..ae9f3ecf2 100644 --- a/lib/browserid/views.js +++ b/lib/browserid/views.js @@ -173,7 +173,7 @@ exports.setup = function(app) { } else { // this is stage or production, explicitly disable all resources under /test app.get(/^\/test/, function(req, res) { - httputils.notFound("Cannot " + req.method + " " + req.url); + httputils.notFound(res, "Cannot " + req.method + " " + req.url); }); } diff --git a/lib/wsapi/stage_user.js b/lib/wsapi/stage_user.js index ff1dd24bf..909d4d3db 100644 --- a/lib/wsapi/stage_user.js +++ b/lib/wsapi/stage_user.js @@ -59,7 +59,7 @@ exports.process = function(req, res) { if (err) { if (err.indexOf('exceeded') != -1) { logger.warn("max load hit, failing on auth request with 503: " + err); - return httputils.serviceUnavailable("server is too busy"); + return httputils.serviceUnavailable(res, "server is too busy"); } logger.error("can't bcrypt: " + err); return res.json({ success: false });