-
Notifications
You must be signed in to change notification settings - Fork 237
Typesafe errors in connection path #1763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 6af2ac1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
| if (reconnectResult.isErr()) { | ||
| return err(reconnectResult.error); | ||
| return err( | ||
| new SignalReconnectError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one of the errors was caused by this method returning a ConnectionError for some reason the return type on the resumeConnection method isn't being type checked here it seems.
This led to the reconnect flow triggering a "full reconnect" instead of a "resume" as "resumes" can only happen for SignalReconnectErrors
| self.emit(EngineEvent.SignalRestarted, joinResult.value); | ||
|
|
||
| await self.waitForPCReconnected(); | ||
| yield* await self.waitForPCReconnected(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the other error was caused by self.waitForPCReconnected throwing.
This is the pitfall of doing a gradual adoption of this pattern. Extra care needed for ensuring that if a method is expected to not throw anymore it actually won't
|
will try to break this up in smaller PRs, starting with #1764 |
No description provided.