1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00

Throw no 'Client Request Error' when body.success is not available

This commit is contained in:
Tim Daubenschütz 2015-12-09 11:24:11 +01:00
parent e240443e7a
commit de3d3e937e

View File

@ -30,7 +30,7 @@ class Requests {
reject(error); reject(error);
} else if(body && body.detail) { } else if(body && body.detail) {
reject(new Error(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'); let error = new Error('Client Request Error');
error.json = { error.json = {
status: response.status, status: response.status,