Repository navigation
fix(rtc): raise ParticipantError when set_metadata, set_name or set_attributes fails - #969
Open
cloudwebrtc wants to merge 3 commits into
Open
cloudwebrtc wants to merge 3 commits into
cloudwebrtc wants to merge 3 commits into
Conversation
Document ParticipantError in the setters' docstrings and add a changeset.
cloudwebrtc
requested review from
changt,
lukasIO and
xianshijing-lk
as code owners
November 30, 2026 02:35
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
lukasIO
reviewed
Nov 30, 2026
Contributor
|
This PR bumps
|
lukasIO
approved these changes
Nov 30, 2026
This branch has not been 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.
Supersedes #490 (rebased on
main, with tests). The fix itself is the original commit from @mike-r-mclaughlin, kept with its authorship.Problem
LocalParticipant.set_metadata(),set_name()andset_attributes()wait for their FFI callback but ignore itserrorfield. When the update fails on the Rust side, for example because the participant lacks thecanUpdateOwnMetadatapermission, the call returns as if it had succeeded, and the caller has no way to tell.Change
ParticipantError(new, inlivekit.rtc.participant) with the callback's error message whenerroris set.Raises:.livekit-rtc: patch) notes the behavior change: code that relied on these calls never raising will now see the error.Tests
tests/rtc/test_participant_setters.pymocks the FFI client and covers each setter with and without an error in the callback. The three error cases fail againstmainand pass with this change.ruff check,ruff format --checkandmypyare clean.