Skip to content

Conversation

hiroshihorie
Copy link
Member

Throws different type of error if server validation failed

@pblazej
Copy link
Contributor

pblazej commented Sep 11, 2025

No more flaky tests? 😄

Hm, looks like this is still related? Is it just ACK (202)?

testParticipantCleanUp, failed: caught error: "Error Domain=io.livekit.swift-sdk Code=202 "Network error(Unknown)" UserInfo={NSLocalizedDescription=Network error(Unknown)}"

case valid
case invalid(message: String)
// Network error etc.
case unknown(error: Error)
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO either throws/Result/Error where throws should be prioritized

@pblazej
Copy link
Contributor

pblazej commented Oct 15, 2025

Let's unblock this PR, 2 nitpicks:

  • ServerValidationResponse should be valid/invalid + the method throws
  • let's maybe revert this line throw LiveKitError(.cancelled, internalError: error)

Othwerwise, LGTM 🌮

@hiroshihorie hiroshihorie requested a review from pblazej October 19, 2025 12:12
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.

2 participants