mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +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);
|
||||
} 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,
|
||||
|
Loading…
Reference in New Issue
Block a user