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:
parent
e240443e7a
commit
de3d3e937e
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user