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

Log pactbroker error bodies #197

Merged
merged 2 commits into from
Nov 21, 2020
Merged

Log pactbroker error bodies #197

merged 2 commits into from
Nov 21, 2020

Conversation

dantb
Copy link
Contributor

@dantb dantb commented Nov 12, 2020

Fixes #196

The specific 400 error mentioned here #71 (comment) can be reproduced with this curl

curl --location --request POST 'https://test.pact.dius.com.au/pacts/provider/scala-pact-provider/consumer/scala-pact-consumer/pact-version/56cd913906efe69e3f8b9fe9c62e69aac2b31aa8/verification-results' \
--header 'Accept: application/hal+json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ZFhmbHR5Rk1nTk9GWkF4cjhpbzl3SjM3aVVwWTQyTTpPNUFJWld4ZWxXYkx2cU1kOFBrQVZ5Y0JKaDJQc3lnMQ==' \
--data-raw '{
  "success": true,
  "providerApplicationVersion": "",
  "buildUrl": "http://my-ci.org/build/3456"
}'

This now prints

Publish verification results failed. Failed with 400, {"errors":{"provider_version":["can't be blank","Version number '' cannot be parsed to a version number. The expected format (unless this configuration has been overridden) is a semantic version. eg. 1.3.0 or 2.0.4.rc1"]}}

@dantb dantb requested a review from jbwheatley November 12, 2020 08:59
@jbwheatley
Copy link
Contributor

jbwheatley commented Nov 12, 2020

needs to run sbt scalafmtAll. Sorry, need to add that to the contributor instructions

Copy link
Contributor

@jbwheatley jbwheatley left a comment

Choose a reason for hiding this comment

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

LGTM otherwise

@jbwheatley jbwheatley merged commit 3bad912 into master Nov 21, 2020
@jbwheatley jbwheatley deleted the log-broker-errors branch January 18, 2021 15:52
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.

Always print pact broker errors
2 participants