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

catch websocket creation exception #894

Closed
wants to merge 1 commit into from
Closed

Conversation

lohanidamodar
Copy link
Member

@lohanidamodar lohanidamodar commented Jul 8, 2024

What does this PR do?

  • Catch exception while creating websocket (previously uncaught) and rethrow as AppwriteException

Fixes appwrite/sdk-for-flutter#211

Test Plan

  • Manually tested

Related PRs and Issues

Have you read the Contributing Guidelines on issues?

YES

@lohanidamodar lohanidamodar requested a review from stnguyen90 July 8, 2024 05:45
Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

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

What happened in your manual testing?

_createSocket() isn't really awaited so an exception isn't ever really caught, right?

@lohanidamodar
Copy link
Member Author

lohanidamodar commented Aug 1, 2024

What happened in your manual testing?

_createSocket() isn't really awaited so an exception isn't ever really caught, right?

  • We try/catch inside _createSocket function, to catch the previously uncaught exceptions caused by getWebSocket so we don't need to await _createSocket itself

@lohanidamodar
Copy link
Member Author

Also this is taken care as a part of #924

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.

🐛 Bug Report: Realtime Issue with `WebSocketException: .... was not upgraded to websocket' in FLUTTER
2 participants