hoverfly-java icon indicating copy to clipboard operation
hoverfly-java copied to clipboard

Throw exception when not finding a match during simulate

Open mogronalol opened this issue 8 years ago • 2 comments

Hoverfly returns a 503 when it can't find a matching response for a request. The application code will then receive this, and try to handle it. In reality it would make more sense for the library to throw something like a NoMatchFoundException on a 503 which is much clearer feedback.

mogronalol avatar Jan 06 '17 15:01 mogronalol

Which thread would that be on ?

paul-hammant avatar Feb 08 '17 00:02 paul-hammant

The idea is that when a http client makes a request through the proxy, instead of receiving a "no match found" response an exception would be thrown. It would be the thread in which the http client makes this call.

I'm not sure how this could be implemented yet, as the proxy is external to the JVM.

mogronalol avatar Feb 08 '17 13:02 mogronalol