tarttelin / JavaStubServer

An HTTP server used in tests to provide canned responses to expected requests.
http://tarttelin.github.io/JavaStubServer/
Other
6 stars 5 forks source link

Changed the canned response for unexpected requests to return a 500 error. #13

Closed rickb777 closed 8 years ago

rickb777 commented 10 years ago

It is likely that the canned response is hit only when the test code contains an error. Therefore it makes sense to return something other than 200-OK, and 500 seems the obvious choice.

R.

tarttelin commented 10 years ago

This is a breaking change. Unmatched responses returning a 200-OK allows users to ignore interactions that are not the subject of the current test, and this is being used. Please modify this pull request to preserve backward compatibility and make a fail by default optional.