This commit is contained in:
pypy
2020-01-13 22:04:20 +09:00
parent 45d4f26458
commit ac8ba5b824
2 changed files with 32 additions and 26 deletions

View File

@@ -311,20 +311,23 @@ CefSharp.BindObjectAsync(
text: escapeTag(json.success.message)
}).show();
}
} else if (isObject(json.error)) {
this.$throw(
json.error.status_code || res.status,
json.error.message,
json.error.data
);
} else if (typeof json.error === 'string') {
this.$throw(
json.status_code || res.status,
json.error
);
} else {
this.$throw(res.status, json);
return json;
}
if (isObject(json)) {
if (isObject(json.error)) {
this.$throw(
json.error.status_code || res.status,
json.error.message,
json.error.data
);
} else if (typeof json.error === 'string') {
this.$throw(
json.status_code || res.status,
json.error
);
}
}
this.$throw(res.status, json);
return json;
}));
if (isGetRequest) {

View File

@@ -248,20 +248,23 @@ CefSharp.BindObjectAsync(
text: escapeTag(json.success.message)
}).show();
}
} else if (isObject(json.error)) {
this.$throw(
json.error.status_code || res.status,
json.error.message,
json.error.data
);
} else if (typeof json.error === 'string') {
this.$throw(
json.status_code || res.status,
json.error
);
} else {
this.$throw(res.status, json);
return json;
}
if (isObject(json)) {
if (isObject(json.error)) {
this.$throw(
json.error.status_code || res.status,
json.error.message,
json.error.data
);
} else if (typeof json.error === 'string') {
this.$throw(
json.status_code || res.status,
json.error
);
}
}
this.$throw(res.status, json);
return json;
}));
if (isGetRequest) {