From 1ecf3c01224ab5b93087bd86152d8eb16dbc581d Mon Sep 17 00:00:00 2001 From: jomo Date: Mon, 21 Sep 2015 22:21:14 +0200 Subject: [PATCH] add 504 to expected return codes, don't cache unexpected responses --- lib/networking.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/networking.js b/lib/networking.js index e34c8ae..ce7effc 100644 --- a/lib/networking.js +++ b/lib/networking.js @@ -90,6 +90,7 @@ exp.get_from_options = function(rid, url, options, callback) { case 429: // this shouldn't usually happen, but occasionally does case 500: case 503: + case 504: // we don't want to cache this body = null; break; @@ -98,6 +99,7 @@ exp.get_from_options = function(rid, url, options, callback) { // Probably 500 or the likes logging.error(rid, "Unexpected response:", code, body); } + body = null; break; }