Repository navigation
fix(homepage): Handle AbortError during video playback - #1214
sentry[bot] wants to merge 2 commits into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | f3ed00f | Commit Preview URL Branch Preview URL |
Sep 02 2026, 11:03 PM |
|
Reproduced the interruption with the current extracted HeroPalmMedia component in a local browser fixture. I delayed the MP4 response by 30 seconds, opened the component, then pressed Pause while play() was pending. That logged The current code catches the rejection already, so this was a console error, not an unhandled promise rejection. Its catch also clears the playing and ready state. The old index.tsx hunk needs to move to components/home/HeroPalmMedia.tsx. In the same fixture, returning early for a DOMException named AbortError stopped the new error log and left the button at Play after pausing. That is a local candidate only, I still need to check other playback failures and restart behavior before committing it. |
|
The current-component fix is now in #1378. The delayed-video check also passed through restart to visible playback at readyState 4, and invalid media still logged NotSupportedError and left the Play button visible. Full pnpm test and the commit hook both passed. I'll keep this linked until #1378 finishes CI and merges, then close this older route-level patch as superseded. |
This PR addresses an issue where an unhandled
AbortErrorwas reported by Sentry whenvideo.play()was interrupted byvideo.pause(). This typically occurred with rapid user interaction (e.g., double-clicking the play/pause button on the homepage video).The root cause was that
void video.play()discarded the Promise returned byplay(), leading to an unhandled rejection when the browser threw anAbortErrordue to interruption.The fix involves modifying the
togglePlaybackfunction insrc/routes/index.tsxto explicitly catch the Promise returned byvideo.play(). A.catch()handler is added to ignoreAbortErrorinstances, which are expected and harmless in this scenario, while still allowing other unexpected errors to be handled.Fixes TANSTACK-COM-4NM
This PR was automatically generated by Sentry. You can adjust this setting at any time.