Skip to content

fix(data_channel_rpc): avoid using DeadlineExceeded for PSRPC errors#1223

Merged
anunaym14 merged 2 commits intomainfrom
fix/dc-rpc-2
Sep 24, 2025
Merged

fix(data_channel_rpc): avoid using DeadlineExceeded for PSRPC errors#1223
anunaym14 merged 2 commits intomainfrom
fix/dc-rpc-2

Conversation

@anunaym14
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Sep 22, 2025

⚠️ No Changeset found

Latest commit: da949c3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

return psrpc.NewErrorf(psrpc.DeadlineExceeded, e.Message, "data", e.Data)
return psrpc.NewErrorf(psrpc.Canceled, e.Message, "data", e.Data)
case DataChannelRpcResponseTimeout:
return psrpc.NewErrorf(psrpc.DeadlineExceeded, e.Message, "data", e.Data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does that translate to API error? Feels like DeadlineExceeded is the right one and that will translate to Timeout

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"error": "twirp error cancelled: twirp error unknown: Response timeout%!

return psrpc.NewErrorf(psrpc.Internal, e.Message, "data", e.Data)
case DataChannelRpcConnectionTimeout:
return psrpc.NewErrorf(psrpc.DeadlineExceeded, e.Message, "data", e.Data)
return psrpc.NewErrorf(psrpc.Canceled, e.Message, "data", e.Data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these args don't make sense for errorf (args 1...n are sprintf template and args for the error message)

@anunaym14 anunaym14 merged commit 3e4e117 into main Sep 24, 2025
7 checks passed
@anunaym14 anunaym14 deleted the fix/dc-rpc-2 branch September 24, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants