Skip to content

Commit

Permalink
Fix bug in chaos middleware breaking responses
Browse files Browse the repository at this point in the history
  • Loading branch information
natenho committed Aug 27, 2024
1 parent 99f53f4 commit 325a128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mockaco.AspNetCore/Middlewares/ChaosMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public async Task Invoke(HttpContext httpContext)
{
if (!_options.Value.Enabled)
{
await _next(httpContext);
return;
}

Expand All @@ -52,7 +53,6 @@ public async Task Invoke(HttpContext httpContext)
if (httpContext.Response.StatusCode != (int)HttpStatusCode.OK)
return;


await _next(httpContext);
}

Expand Down

0 comments on commit 325a128

Please sign in to comment.