1
0
mirror of https://github.com/flarum/core.git synced 2025-08-02 14:37:49 +02:00

Improve request error debug output

This commit is contained in:
Toby Zerner
2015-10-21 10:47:07 +10:30
parent 14af6c0e8b
commit 2a5c0c1c7a
3 changed files with 14 additions and 4 deletions

View File

@@ -206,7 +206,7 @@ export default class App {
try {
return JSON.parse(responseText);
} catch (e) {
throw new RequestError(500, responseText);
throw new RequestError(500, responseText, options, xhr);
}
});
@@ -230,7 +230,7 @@ export default class App {
const status = xhr.status;
if (status < 200 || status > 299) {
throw new RequestError(status, responseText, xhr);
throw new RequestError(status, responseText, options, xhr);
}
return responseText;