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

Remove incorrect toString() for URL in RestClientGraphQLClient error handling #2069

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

paulbakker
Copy link
Collaborator

@paulbakker paulbakker commented Nov 22, 2024

Fix for #2059.

By default, the error handling for failing HTTP requests is done by RestClient itself, so the extra error check we have in code is typically not used. Added a test for this.

If a non-default status code handler is configured on the RestClient, it might still fall through, so I kept the existing error handling. However, I removed the incorrect toString() use for the url field in the exception.
In a RestClient you can't actually see what URL it is configured for, so we don't have access to the URL during error handling in this case. This is acceptable because this exception only throws when the user overrides the handling, and not handle a status code correctly.

@paulbakker paulbakker merged commit 0df18d0 into master Nov 22, 2024
3 checks passed
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