Repository navigation
fix(vimeo-video-element): dispatch error event when the video fails to load - #264
Merged
spuppo-mux merged 3 commits intoOct 7, 2026
Merged
spuppo-mux merged 3 commits into
spuppo-mux merged 3 commits into
Conversation
…o load When the Vimeo player rejects its ready promise (e.g. NotFoundError for a deleted video), dispatch an ErrorEvent carrying the Vimeo error instead of leaving two unhandled promise rejections. Fixes #263 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@ThomasChance is attempting to deploy a commit to the Mux Team on Vercel. A member of the Team first needs to authorize it. |
spuppo-mux
force-pushed
the
fix/vimeo-not-found-unhandled-rejection
branch
from
October 7, 2026 18:10
f8a2a37 to
5d6e0b1
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5d6e0b1. Configure here.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
spuppo-mux
approved these changes
Oct 7, 2026
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Fixes #263
What
When the Vimeo player rejects its
ready()promise (for exampleNotFoundError: This video does not exist.for a deleted video),<vimeo-video>now:ErrorEvent('error', { error, message })on the element, so the error details are available to consumers (event.error,event.message), following the same pattern aspeertube-video-elementgetTextTracks()rejection, which goes through the sameready()promiseThis removes both unhandled promise rejections.
Tests
Added
dispatches an error event when the video does not existtotest/test.js. It fails onmain(noerrorevent, test times out) and passes with this change.Two notes on the test setup, outside the scope of this PR:
npm testscript iswet run, but thewetCLI only handlesserve,testandrelease, sowet runexits 0 without running anything (same for the other packages usingwet run).test/index.html's importmap doesn't mapmedia-played-ranges-mixin, so the element never loads in the test page. To run the suite locally I temporarily added"media-played-ranges-mixin": "https://cdn.jsdelivr.net/npm/media-played-ranges-mixin@0.1/+esm"and rannpx wet test. The new test passes; the existing tests that wait onloadCompletetime out in headless Chromium onmainas well as on this branch.🤖 Generated with Claude Code
Note
Low Risk
Localized error-handling in the Vimeo custom element; no auth or data-path changes, with behavior covered by a new test.
Overview
When the Vimeo SDK rejects
ready()(e.g. deleted or invalid video),<vimeo-video>now surfaces the failure like other media elements: it stores the rejection onvideo.error, dispatches anerrorErrorEventwithevent.errorandevent.message, and clears that state on reload.getTextTracks()rejections are caught so they don’t become a second unhandled rejection afterready()fails.A test asserts
NotFoundErrorfor a bad URL. Demosrcvalues in the Next.js example and packageindex.htmlload button were switched to a working Vimeo ID.Reviewed by Cursor Bugbot for commit 5d6e0b1. Bugbot is set up for automated code reviews on this repo. Configure here.