Skip to content
This repository has been archived by the owner on Aug 9, 2020. It is now read-only.

Custom HTTP code for when no matching response is found #3

Merged
merged 2 commits into from
May 30, 2013
Merged

Custom HTTP code for when no matching response is found #3

merged 2 commits into from
May 30, 2013

Conversation

samstarling
Copy link

Hi,

In my code, I find it useful to have the MockHttpServer return something other than a 500 when a mock response isn't found. I thought I'd be a good citizen and contribute back to your original project.

Let me know what you think! I added a test in MockHttpServerTest.

Thanks,
Sam

@kristofa
Copy link
Owner

Hi Sam,

Thanks for your addition. I think it is worthwhile to have this functionality. One remark. You added a test in which you set the 'no match found return code' to 200 but this is the same as the return code for the /foo request. So in case there would be a bug so /foo request is matched with /bar request the test could still be green. I would advise that you change the 'no match found return code' to another value. What do you think?

Kristof

…ash with the HTTP code used by the responseProvider.
@samstarling
Copy link
Author

Hi Kristofa - excellent idea, thanks. I've changed it to 403!

kristofa added a commit that referenced this pull request May 30, 2013
Custom HTTP code for when no matching response is found
@kristofa kristofa merged commit 7008fbe into kristofa:master May 30, 2013
@kristofa
Copy link
Owner

Thanks. Changes are merged and committed. I'll try to make a release in a week or two (there is something else I would like to add first as well).

@samstarling
Copy link
Author

Thanks! What's the best way to keep track of when the release happens?

@kristofa
Copy link
Owner

I'll post a comment to this closed pull request when the release happened.

@kristofa
Copy link
Owner

kristofa commented Jun 8, 2013

Hi Sam,

Release 1.2 is out and should be available in about 2 hours through Maven central.
It includes changes from this pull request.

Kristof

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants