dotnet / dotnet/command-line-api

Async command handler exists execution unexpectedly.

Open
#1,642 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

We have declared async command handler this way:

**public static async Task ImportTwilioMessages(ImportTwilioOptions options, IHost host)
{
}**

and set it up this way:

**loadTwilioSmsStatuses.Handler = CommandHandler.Create(ImportTwilioMessages);**

and when this method is callled:
**var fetchedResult = await MessageResource.ReadAsync(dateSentAfter: from, dateSentBefore: to);**
the whole process just exits without any exceptions.

Just switching to not-async command handler solved the issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.