fix(core): implement editor timeout and report error from boundary (#5105)

This commit is contained in:
Joooye_34
2023-11-29 16:10:38 +08:00
committed by GitHub
parent c0ede1326d
commit 50010bd824
26 changed files with 646 additions and 256 deletions
@@ -5,7 +5,7 @@ export abstract class RecoverableError extends Error {
return this.ttl > 0;
}
abstract retry(): void;
abstract retry(): void | Promise<void>;
}
// the first session request failed after login or signup succeed.
@@ -24,8 +24,6 @@ export class SessionFetchErrorRightAfterLoginOrSignUp extends RecoverableError {
}
try {
this.onRetry();
} catch (e) {
console.error('Retry error', e);
} finally {
this.ttl--;
}