fix(router): recover from panics in hooks (Cosmo Streams)#2311
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughAdds comprehensive panic recovery and error handling across pubsub datasource operations. Converts Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Router image scan passed✅ No security vulnerabilities found in image: |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
1a9e361 to
458be27
Compare
Summary by CodeRabbit
Bug Fixes
Tests
Checklist
Add panic recoveries to Cosmo Streams hooks. Now when inside a hook a panic happens the error message gets logged with
[Recovery from handler panic], similar to other places in the router. Also if we deal with subscription hooks, the subscription gets closed normally. On the OnPublishEvent hook we return a success:false message back to the client the same way we deal with normal errors being returned by that hook.