Skip to content

Commit

Permalink
Removed unneeded runtime check after function invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
stidsborg committed Jul 26, 2024
1 parent fa59820 commit 0b19095
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,6 @@ private async Task PersistFailure(FlowId flowId, Exception exception, TParam par

private async Task PersistResultAndEnsureSuccess(FlowId flowId, Result<TReturn> result, TParam param, Workflow workflow, int expectedEpoch = 0, bool allowPostponedOrSuspended = false)
{
if (result.Succeed && result.SucceedWithValue is Task) //todo remove
{
var serializationException = new SerializationException("Unable to serialize result of Task-type");
await _invocationHelper.PersistFailure(flowId, serializationException, param, workflow.States.SerializeDefaultState(), expectedEpoch);
throw serializationException;
}

var outcome = await _invocationHelper.PersistResult(flowId, result, param, workflow.States.SerializeDefaultState(), expectedEpoch);
switch (outcome)
{
Expand Down

0 comments on commit 0b19095

Please sign in to comment.