REturn workflowstate around faulted workflowinstances to make it consistent, add UsesSasTokent to make all in one work (#4484)

This commit is contained in:
herblinernexxbizz 2023-09-26 15:29:45 +02:00 committed by GitHub
parent fd9554937a
commit acc5bb5ac3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -17,6 +17,7 @@ var identityTokenSection = identitySection.GetSection("Tokens");
// Add Elsa services.
services
.AddElsa(elsa => elsa
.UseSasTokens()
.UseIdentity(identity =>
{
identity.IdentityOptions = options => identitySection.Bind(options);

View file

@ -114,7 +114,7 @@ internal class Execute : ElsaEndpoint<Request, Response>
private async Task HandleFaultAsync(WorkflowState workflowState, CancellationToken cancellationToken)
{
var faultedResponse = _apiSerializer.Serialize(workflowState);
var faultedResponse = _apiSerializer.Serialize(new Response(workflowState));
HttpContext.Response.ContentType = MediaTypeNames.Application.Json;
HttpContext.Response.StatusCode = StatusCodes.Status500InternalServerError;