mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +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;
|
|
}
|
|
}
|