feat(listener): emit error events for stream errors and timeouts #2215
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(listener): emit error events for stream errors and timeouts
Summary
Adds error event emissions for transcription stream errors and timeouts to enable UI feedback when actor errors occur. This allows the frontend to display meaningful error messages when WebSocket streams fail.
Changes:
SessionErrorEvent::ConnectionErrorforStreamErrorevents (withis_retryable: false)SessionErrorEvent::ConnectionErrorforStreamTimeoutevents (withis_retryable: false){}) instead of debug formatting ({:?}) for cleaner error messages in connection failuresUpdates since last revision
Resolved merge conflicts with main branch. The upstream had already introduced
SessionErrorEventwithConnectionErrorandAudioErrorvariants, so this PR now uses those existing event types rather than adding a customErrorvariant. Theemit_session_errorhelper function was removed in favor of using the upstream event structure directly.Review & Testing Checklist for Human
StreamErrorandStreamTimeoutshould surface to the frontendis_retryable: falseis correct - Stream errors/timeouts are marked as non-retryable; confirm this matches expected behaviorRecommended test plan:
SessionErrorEvent::ConnectionErrorwith the stream error detailsNotes
SourceStateis cosmetic (session_id before app) - no functional changeLink to Devin run: https://app.devin.ai/sessions/c2bf0e6b0059480ca52d1cb1f244502a
Requested by: yujonglee (@yujonglee)