From 4730785e3a524964d2aceead35f888177932305b Mon Sep 17 00:00:00 2001 From: Mike Levine Date: Tue, 12 Jul 2016 11:31:09 -0700 Subject: [PATCH] Improve 404 message with href that failed --- lib/iControl.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/iControl.js b/lib/iControl.js index 335089a..ac26329 100644 --- a/lib/iControl.js +++ b/lib/iControl.js @@ -103,7 +103,7 @@ iControl.prototype._request = function(opts, cb) { var msg; if (res.statusCode === 404) { - msg = '404: Not found'; + msg = '404: Not found for: ' + res.request.uri.href; } else { @@ -112,7 +112,7 @@ iControl.prototype._request = function(opts, cb) { return cb(msg, false); } - + // If retrieving via GET, handle pagination if (this.method === 'GET') { @@ -126,7 +126,7 @@ iControl.prototype._request = function(opts, cb) { return cb(false, body); } } - + // For POST/PUT/DELETE, return body else { return cb(false, body);