mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
20 lines
488 B
JavaScript
20 lines
488 B
JavaScript
export class HomeServerError extends Error {
|
|
constructor(method, url, body, status) {
|
|
super(`${body ? body.error : status} on ${method} ${url}`);
|
|
this.errcode = body ? body.errcode : null;
|
|
this.retry_after_ms = body ? body.retry_after_ms : 0;
|
|
this.statusCode = status;
|
|
}
|
|
|
|
get isFatal() {
|
|
switch (this.errcode) {
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
export {AbortError} from "../utils/error.js";
|
|
|
|
export class NetworkError extends Error {
|
|
}
|