mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 00:43:39 +08:00
17 lines
341 B
JavaScript
17 lines
341 B
JavaScript
export default class RequestError {
|
|
constructor(status, responseText, options, xhr) {
|
|
this.status = status;
|
|
this.responseText = responseText;
|
|
this.options = options;
|
|
this.xhr = xhr;
|
|
|
|
try {
|
|
this.response = JSON.parse(responseText);
|
|
} catch (e) {
|
|
this.response = null;
|
|
}
|
|
|
|
this.alert = null;
|
|
}
|
|
}
|