forked from mystiq/hydrogen-web
f8f13f54be
and also not being handled in the Reconnector
26 lines
649 B
JavaScript
26 lines
649 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 name() {
|
|
return "HomeServerError";
|
|
}
|
|
}
|
|
|
|
export {AbortError} from "../utils/error.js";
|
|
|
|
export class ConnectionError extends Error {
|
|
constructor(message, isTimeout) {
|
|
super(message || "ConnectionError");
|
|
this.isTimeout = isTimeout;
|
|
}
|
|
|
|
get name() {
|
|
return "ConnectionError";
|
|
}
|
|
}
|