Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft for discussion: on sending a signal when networking fails #1217

Closed
wants to merge 1 commit into from

Conversation

jingwei99
Copy link

No description provided.

@jingwei99 jingwei99 force-pushed the jingwei.IOException branch from 14e1d91 to 4ee1c61 Compare January 10, 2024 00:56
Comment on lines +285 to +287
} catch (e: IOException) {
send(LoadResult.Failure(e))
return null
Copy link
Author

Choose a reason for hiding this comment

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

I started working on the idea of "surfacing networking failure", and realized that for the catch (e: Exception) branch, does send(LoadResult.Failure(e)) already, and the downstream can check the type of the exception and if it's an IOException, the downstream will take it as an networking failure. So the change needed might be adding a documentation about IOException for LoadResult.Failure.

Or maybe I'm missing something / forgot something

Copy link
Author

Choose a reason for hiding this comment

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

talked over video, we don't need this, closing the draft

@jingwei99 jingwei99 closed this Jan 10, 2024
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.

1 participant