Skip to content

Fix http error parsing #295

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

Merged
merged 2 commits into from
Jul 2, 2025
Merged

Fix http error parsing #295

merged 2 commits into from
Jul 2, 2025

Conversation

rkistner
Copy link
Contributor

@rkistner rkistner commented Jul 2, 2025

We should catch Exception, not Error. This resulted in errors like this:

FormatException: Unexpected character (at character 1)
<html>
^

With this change, we're getting the expected exception:

SyncResponseException: 503 Service Unavailable

@rkistner rkistner requested a review from simolus3 July 2, 2025 10:31
simolus3
simolus3 previously approved these changes Jul 2, 2025
Copy link
Contributor

@simolus3 simolus3 left a comment

Choose a reason for hiding this comment

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

One nit about merging the shared part of the two methods into one since they're identical, but apart from that this looks good to me 👍

@rkistner rkistner merged commit 38ed119 into main Jul 2, 2025
5 checks passed
@rkistner rkistner deleted the fix-parsing-errors branch July 2, 2025 16:14
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