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

HalClient should include HTTP response body in exception message #1830

Open
timvahlbrock opened this issue Oct 7, 2024 · 2 comments
Open
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@timvahlbrock
Copy link
Contributor

If the communication with the pact broker fails (in my case because I used the matching branch selector, but did not provide a provider branch name), the status code (in my case 400) is logged, but not the response body. Especially in 400 responses this would really simplify the debugging. Right now I have to set a breakpoint within pact to get the response body.

@timvahlbrock
Copy link
Contributor Author

Nvm. just took a further look around where RequestFailedException is used. Seems that it should be parsed and logged in case of 400 errors. Will further investigate, why I'm not seeing it.

@timvahlbrock
Copy link
Contributor Author

400 response is only logged when publishing, would be helpful with contract fetching as well.

@timvahlbrock timvahlbrock reopened this Oct 7, 2024
@uglyog uglyog added the bug Indicates an unexpected problem or unintended behavior label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants