2018-12-21 14:35:24 +01:00
|
|
|
export class HomeServerError extends Error {
|
2020-03-17 00:07:54 +01:00
|
|
|
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;
|
2019-06-26 22:31:36 +02:00
|
|
|
}
|
2019-07-01 10:00:29 +02:00
|
|
|
|
|
|
|
get isFatal() {
|
|
|
|
switch (this.errcode) {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2019-02-04 23:31:35 +01: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 {
|
|
|
|
}
|