-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Print response body when any error response received during any interaction with the Pact Broker #1092
Comments
Hi, Also, I've noticed in the Pact JVM Docs that there isn't a reference to PactFlow, and wondered if it was worth also linking to the PactFlow docs here too? Just a suggestion. Thanks! |
Try using a username and password instead of a bearer token, and you'll get a response body. On the weekend I did a change to add an error message for general 401s - I'll release it today. |
And yes, we should put in a link to pactflow. This is the link we'd want https://docs.pactflow.io/docs/getting-started/#configuring-your-api-token |
Ah awesome! I'll get some time this weekend to try and integrate it / raise the pull requests. |
hi |
If there's a single/small number of points to put this code so that it worked for all calls, that would be great. One can dream...
If there is not, there are two main use cases that crop up frequently that it would be great to cover.
Print the body when there is a 401 response received from Pactflow. There is text in the error response that helps users with incorrectly configured credentials to fix their configuration (eg. a lot of people try to connect using basic auth instead of their API token. The response body indicates this.) The most common place this happens is during pact publication, because that's the first thing people try to do.
The other main use case is the error response received when publishing verification results. It's possible this output was added in a later version of the code, but people are still using old versions, so if this is already added, then ignore this bit!
The text was updated successfully, but these errors were encountered: