mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-19 15:01:18 +02:00
Fix LogEntries: collection was modified exception (#309)
* _options.LogEntries.ToArray() * . * update error message
This commit is contained in:
@@ -118,7 +118,7 @@ namespace WireMock.Owin
|
||||
await Task.Delay(_options.RequestProcessingDelay.Value);
|
||||
}
|
||||
|
||||
response = await targetMapping.ResponseToAsync(request);
|
||||
response = await targetMapping.ProvideResponseAsync(request);
|
||||
|
||||
if (targetMapping.Scenario != null)
|
||||
{
|
||||
@@ -129,7 +129,7 @@ namespace WireMock.Owin
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_options.Logger.Error("HttpStatusCode set to 500");
|
||||
_options.Logger.Error($"Providing a Response for Mapping '{result.TargetMapping.Guid}' failed. HttpStatusCode set to 500. Exception: {ex}");
|
||||
response = ResponseMessageBuilder.Create(JsonConvert.SerializeObject(ex), 500);
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user