mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Proxy mode: Unhandled exception when target is not working #273
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LevYas on GitHub (May 17, 2020).
WireMock returns stack trace instead of a meaningful message, it is very misleading.

Repro: https://github.com/LevYas/WireMockNetRepro
It would be very nice to return a message, saying that the target is not available.
@StefH commented on GitHub (May 18, 2020):
Preview version
WireMock.Net.1.2.10-ci-13352on MyGet should fix this 500 error, please test.@LevYas commented on GitHub (May 18, 2020):
Tested. For me, it doesn't return "No such host is known.", but "No connection could be made because the target machine actively refused it.":
Anyway, it's much better than a stack trace :D
But I think the test in your PR might not be stable.
@StefH commented on GitHub (May 18, 2020):
I run the tests for netcore 3.1 and I noticed a difference there, so I just check on
known.@LevYas commented on GitHub (May 18, 2020):
I also used netcore 3.1, but on Windows, maybe that's the reason
@StefH commented on GitHub (May 18, 2020):
OK, the difference is that I try to connect to a non-existing hostname.
And you try to connect to localhost (which exists) but nothing listens at port 5000.
@LevYas commented on GitHub (May 18, 2020):
Ah, sure, you are right, thanks.
@StefH commented on GitHub (May 18, 2020):
I'll merge to master. New NuGet will be released soon.