From de3d3e937e8a0f1150e558eeb79e0e7794430059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Wed, 9 Dec 2015 11:24:11 +0100 Subject: [PATCH] Throw no 'Client Request Error' when body.success is not available --- js/utils/requests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/utils/requests.js b/js/utils/requests.js index 9195661d..f55ee139 100644 --- a/js/utils/requests.js +++ b/js/utils/requests.js @@ -30,7 +30,7 @@ class Requests { reject(error); } else if(body && body.detail) { reject(new Error(body.detail)); - } else if(!body.success) { + } else if('success' in body && !body.success) { let error = new Error('Client Request Error'); error.json = { status: response.status,