mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-24 10:22:13 +01:00
Fix unhandled exception when target is unavailable (#469)
* wip * fix * 31 * known
This commit is contained in:
@@ -129,7 +129,7 @@ namespace WireMock.Owin
|
||||
catch (Exception ex)
|
||||
{
|
||||
_options.Logger.Error($"Providing a Response for Mapping '{result?.Mapping?.Guid}' failed. HttpStatusCode set to 500. Exception: {ex}");
|
||||
response = ResponseMessageBuilder.Create(JsonConvert.SerializeObject(ex), 500);
|
||||
response = ResponseMessageBuilder.Create(ex.Message, 500);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
using WireMock.Admin.Mappings;
|
||||
using WireMock.Admin.Requests;
|
||||
using WireMock.Logging;
|
||||
using WireMock.Types;
|
||||
using WireMock.ResponseBuilders;
|
||||
using WireMock.Util;
|
||||
using WireMock.Types;
|
||||
|
||||
namespace WireMock.Serialization
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user