printing body when unexpected status code #137
fpeterschmitt
started this conversation in
Ideas
Replies: 4 comments
|
Hi, I think this makes sense and actually we already have an issue for a very similar feature: #69. Will it solve your problem? The issue is still in progress though. |
0 replies
|
yep that looks absolutely great! :) |
0 replies
|
This feature is not implemented yet, however #69 is finished and now httpexpect allows to implement it in user code. See https://github.com/gavv/httpexpect#customize-failure-formatting and https://github.com/gavv/httpexpect#customize-assertion-handling Also I will create an issue for implementing this functionality inside httpexpect. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi 👋
I would like to know if you would be interested in having a new
Expect().Status(x)behavior that would print out the response body if the status is not as expected.My motivation is that i want to write scenarios instead of unitary endpoint tests. And for that, i need to use the "Require" reporter that will stop immediately after the first error encountered, otherwise the results are completely broken after the first failure :)
I have an idea for implementation: through configuration, being able to provide a custom status formatter/checker instead of the default, current implementation. This formatter/checker would be called after the chain check and receive the response as parameter.
What do you think?
All reactions