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

fix(exception): better handle non-JSON response bodies #1404

Merged
merged 4 commits into from
Mar 3, 2025

Conversation

sp00m
Copy link
Contributor

@sp00m sp00m commented Dec 10, 2024

When an error occurs and the response body isn't JSON (e.g. a misconfiguration of the base path triggering an HTML error page as a response), the code swallows the original error and instead throws a parsing exception.

This PR ensures parsing exceptions are ignored so that the original issue remains available.

@sp00m sp00m requested a review from a team as a code owner December 10, 2024 16:36
@gcatanese
Copy link
Contributor

@sp00m Thank you for the contribution. It is a useful change, but the unit test fails. Can you maybe have a look? Thank you

@sp00m
Copy link
Contributor Author

sp00m commented Feb 18, 2025

@sp00m Thank you for the contribution. It is a useful change, but the unit test fails. Can you maybe have a look? Thank you

The unit tests do pass, it's your SonarCloud pipeline that seems to fail because somehow misconfigured?

@gcatanese gcatanese merged commit 8780711 into Adyen:main Mar 3, 2025
1 check 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.

3 participants