mockhttp
mockhttp copied to clipboard
Feedback about 404
I'm facing an issue trying to get more feedback from mockhttp
- when I setup my mock, either with
When
style, orExpected
style - when implementation slightly changes, for example a field in a request is serialized wrongly, so potentially introducing a bug
- mockhttp returns 404, as the request no longer matches the setup
- but then it's not really clear what happened, and one will need to look at 10-20 different things to understand what changed
- and also be aware that 404 could mean any change in implementation for: url, verb, parameters, headers, request
Now
- perhaps there is a way to setup the test, to tell me where exactly the test failed in expected vs actual
- didn't notice an example of this in the documentation (did not read everything though)
- I also thought a different behaviour on this issue for
When
vsExpected
style (but both gave me 404)
Awesome library, btw :heart:
This is a great idea. I did actually start down this path, but I ended up getting stuck trying to avoid changing any public APIs. I'll take a another look at this at somepoint.
I'm having the same issue, I can't understand why my mocks are returning 404, but they are 😢
Version 7.0.0 now defaults to a thrown exception for unmatched requests and the exception message includes a full rundown of what did / did not match. Appreciate any feedback, and thanks for your patience on this one.