From 652b22ca8d3aaa29c6f2b1ab8a31c9e4cce025a1 Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Thu, 10 Nov 2011 13:04:36 -0700
Subject: [PATCH] bad requests due to missing parameters logged at warn level,
 not error.

---
 lib/validate.js       | 5 +++--
 lib/wsapi/cert_key.js | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/validate.js b/lib/validate.js
index 0dceafa66..a09217be2 100644
--- a/lib/validate.js
+++ b/lib/validate.js
@@ -65,8 +65,9 @@ module.exports = function (params) {
       });
       next();
     } catch(e) {
-      logger.error(e.toString());
-      return httputils.badRequest(resp, "missing '" + e + "' argument");
+      var msg = "missing '" + e + "' argument";
+      logger.warn("bad request recieved: " + msg);
+      return httputils.badRequest(resp, msg);
     }
   };
 };
diff --git a/lib/wsapi/cert_key.js b/lib/wsapi/cert_key.js
index 57d821281..c72e1cb57 100644
--- a/lib/wsapi/cert_key.js
+++ b/lib/wsapi/cert_key.js
@@ -20,7 +20,7 @@ exports.process = function(req, res) {
     keysigner.path = '/wsapi/cert_key';
     forward(keysigner, req, res, function(err) {
       if (err) {
-        logger.error("error forwarding request:", err);
+        logger.error("error forwarding request: " + err);
       }
     });
   });
-- 
GitLab