1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

also handle error.detail

This commit is contained in:
Tim Daubenschütz 2015-07-17 18:10:11 +02:00
parent 55058b8b34
commit 55f00ea0ab

View File

@ -35,6 +35,8 @@ class Requests {
let error = new Error('Form Error');
error.json = body;
reject(error);
} else if(body && body.detail) {
reject(new Error(body.detail));
} else {
resolve(body);
}