2018-12-21 14:35:24 +01:00
|
|
|
export class HomeServerError extends Error {
|
2019-06-26 22:31:36 +02:00
|
|
|
constructor(method, url, body) {
|
|
|
|
super(`${body.error} on ${method} ${url}`);
|
|
|
|
this.errcode = body.errcode;
|
2019-06-28 00:52:54 +02:00
|
|
|
this.retry_after_ms = body.retry_after_ms;
|
2019-06-26 22:31:36 +02:00
|
|
|
}
|
2019-07-01 10:00:29 +02:00
|
|
|
|
|
|
|
get isFatal() {
|
|
|
|
switch (this.errcode) {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2019-02-04 22:31:35 +00:00
|
|
|
}
|
|
|
|
|
2019-02-10 21:25:29 +01:00
|
|
|
export class RequestAbortError extends Error {
|
2019-03-08 12:26:59 +01:00
|
|
|
}
|
2019-02-10 21:25:29 +01:00
|
|
|
|
2019-03-08 12:26:59 +01:00
|
|
|
export class NetworkError extends Error {
|
|
|
|
}
|