1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +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);
} 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,