This repository has been archived on 2022-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
hydrogen-web/src/matrix/error.js

20 lines
491 B
JavaScript
Raw Normal View History

2018-12-21 19:05:24 +05:30
export class HomeServerError extends Error {
2020-03-17 04:37:54 +05:30
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;
2020-04-18 22:46:16 +05:30
this.statusCode = status;
2019-06-27 02:01:36 +05:30
}
2019-07-01 13:30:29 +05:30
get isFatal() {
switch (this.errcode) {
}
}
2019-02-05 04:01:35 +05:30
}
export {AbortError} from "../utils/error.js";
2019-02-11 01:55:29 +05:30
2020-04-19 22:35:12 +05:30
export class ConnectionError extends Error {
2019-03-08 16:56:59 +05:30
}