-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat(push): add callback on subscription lost event #2737
feat(push): add callback on subscription lost event #2737
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2737 +/- ##
==========================================
- Coverage 94.53% 94.48% -0.05%
==========================================
Files 81 81
Lines 2635 2648 +13
Branches 664 666 +2
==========================================
+ Hits 2491 2502 +11
- Misses 140 142 +2
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…-Flux-that-no-longer-exists
…-Flux-that-no-longer-exists
…-Flux-that-no-longer-exists
…-Flux-that-no-longer-exists
…-Flux-that-no-longer-exists
…-Flux-that-no-longer-exists
…-Flux-that-no-longer-exists
…-Flux-that-no-longer-exists
Quality Gate passedIssues Measures |
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.
LGTM and can be merged when the tests are passed.
throw new Error( | ||
endpointInfo | ||
? `Error in ${endpointInfo.endpointName}.${endpointInfo.methodName}(${JSON.stringify(endpointInfo.params)}): ${message.message}` | ||
: `Error in unknown subscription: ${message.message}`, | ||
); |
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.
Minor: A test can be added to cover this change.
This PR allows to define a behavior for when the
reopened
event happens on the client.The new
onSubscriptionLost
callback can be used to perform an action when the websocket is reopened, but there's no longer a Flux connected to the subscription. Based on the return value of that callback, automatic resubscription can be performed.Fixes #2716