Ensure no response if already started

This commit is contained in:
Sipke Schoorstra 2021-04-04 15:17:40 +02:00
parent 9b3df1916b
commit 33231bac85

View file

@ -49,6 +49,9 @@ namespace Elsa.Activities.Http.Middleware
{
if (workflowInstance.WorkflowStatus == WorkflowStatus.Faulted)
{
if (httpContext.Response.HasStarted)
return;
httpContext.Response.StatusCode = (int) HttpStatusCode.InternalServerError;
httpContext.Response.ContentType = "application/json";