Skip to content
This repository
Browse code

HTTP-Errors start from 400, not from 300. Also, the 300's are nothing…

… to ignore, they're pretty essential (see meanings of 301, 302, 304). I changed this mainly because I couldn't test the new opts.headers feature without, but tests are running fine with this change and I don't *think* there might be issues with that.
  • Loading branch information...
commit afac0e244dbc39d86f859ac4131c8c6deffef053 1 parent bfcfbb5
Dominique Sandoz authored May 29, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  nano.js
2  nano.js
@@ -275,7 +275,7 @@ module.exports = exports = nano = function database_module(cfg) {
275 275
 
276 276
         try { parsed = JSON.parse(b); } catch (err) { parsed = b; }
277 277
 
278  
-        if (status_code >= 200 && status_code < 300) {
  278
+        if (status_code >= 200 && status_code < 400) {
279 279
           log({err: null, body: parsed, headers: rh});
280 280
           callback(null,parsed,rh);
281 281
           return stream;

0 notes on commit afac0e2

Please sign in to comment.
Something went wrong with that request. Please try again.