From 55db39b2312228294ce49763f26911d8bd2ed4d9 Mon Sep 17 00:00:00 2001 From: Vishal Lal Date: Wed, 15 Mar 2017 12:53:26 +0100 Subject: [PATCH] Check response status code --- api/orders/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/orders/index.js b/api/orders/index.js index 852e49bb3..da9a11de3 100644 --- a/api/orders/index.js +++ b/api/orders/index.js @@ -58,7 +58,7 @@ async.waterfall([ function (callback) { request(endpoints.customersUrl + "/" + custId, function (error, response, body) { - if (error) { + if (error || response.status_code === "500") { callback(error); return; }