@@ -440,6 +440,8 @@ async def wait_for_completion_or_create_check_status_response(
440
440
lambda : self ._create_http_response (200 , status .to_json ()),
441
441
OrchestrationRuntimeStatus .Failed :
442
442
lambda : self ._create_http_response (500 , status .to_json ()),
443
+ None :
444
+ None
443
445
}
444
446
445
447
result = switch_statement .get (status .runtime_status )
@@ -456,6 +458,7 @@ async def wait_for_completion_or_create_check_status_response(
456
458
await sleep (sleep_time )
457
459
else :
458
460
return self .create_check_status_response (request , instance_id )
461
+ return self .create_check_status_response (request , instance_id )
459
462
460
463
async def signal_entity (self , entityId : EntityId , operation_name : str ,
461
464
operation_input : Optional [Any ] = None ,
@@ -640,6 +643,7 @@ async def rewind(self,
640
643
641
644
response = await self ._post_async_request (request_url , None )
642
645
status : int = response [0 ]
646
+ ex_msg : str = ""
643
647
if status == 200 or status == 202 :
644
648
return
645
649
elif status == 404 :
@@ -648,6 +652,9 @@ async def rewind(self,
648
652
elif status == 410 :
649
653
ex_msg = "The rewind operation is only supported on failed orchestration instances."
650
654
raise Exception (ex_msg )
651
- else :
655
+ elif isinstance ( response [ 1 ], str ) :
652
656
ex_msg = response [1 ]
653
657
raise Exception (ex_msg )
658
+ else :
659
+ ex_msg = "Received unexpected payload from the durable-extension: " + str (response )
660
+ raise Exception (ex_msg )
0 commit comments