Skip to content

Commit 82fc701

Browse files
Add handling NRE on httpApiHandler when doing WaitForCompletionOrCreateCheckStatusResponseAsync (#2545)
1 parent 3fc88b9 commit 82fc701

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/WebJobs.Extensions.DurableTask/ContextImplementations/DurableClient.cs

+5
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,11 @@ internal async Task<HttpResponseMessage> WaitForCompletionOrCreateCheckStatusRes
801801
TimeSpan retryInterval,
802802
bool returnInternalServerErrorOnFailure)
803803
{
804+
if (this.httpApiHandler == null)
805+
{
806+
throw new InvalidOperationException("IDurableClient.WaitForCompletionOrCreateCheckStatusResponseAsync is not supported for IDurableClient instances created outside of a Durable Functions application.");
807+
}
808+
804809
return await this.httpApiHandler.WaitForCompletionOrCreateCheckStatusResponseAsync(
805810
request,
806811
instanceId,

0 commit comments

Comments
 (0)