@@ -905,7 +905,7 @@ def set_complete(
905905 if result is not None :
906906 try :
907907 result_json = result if is_result_encoded else shared .to_json (result )
908- except TypeError :
908+ except ( ValueError , TypeError ) :
909909 result_json = shared .to_json (str (JsonEncodeOutputException (result )))
910910 action = ph .new_complete_orchestration_action (
911911 self .next_sequence_number (), status , result_json
@@ -1779,7 +1779,7 @@ def process_event(
17791779 if not entity_task :
17801780 if not ctx .is_replaying :
17811781 self ._logger .warning (
1782- f"{ ctx .instance_id } : Ignoring unexpected entityOperationCompleted event with request ID = { request_id } ."
1782+ f"{ ctx .instance_id } : Ignoring unexpected entityOperationFailed event with request ID = { request_id } ."
17831783 )
17841784 return
17851785 failure = EntityOperationFailedException (
@@ -1801,7 +1801,7 @@ def process_event(
18011801 if action and action .HasField ("sendEntityMessage" ):
18021802 if action .sendEntityMessage .HasField ("entityOperationCalled" ):
18031803 entity_id , event_id = self ._parse_entity_event_sent_input (event )
1804- ctx ._entity_task_id_map [event_id ] = (entity_id , event .entityOperationCalled .operation , event .eventId )
1804+ ctx ._entity_task_id_map [event_id ] = (entity_id , action . sendEntityMessage .entityOperationCalled .operation , event .eventId )
18051805 elif action .sendEntityMessage .HasField ("entityLockRequested" ):
18061806 entity_id , event_id = self ._parse_entity_event_sent_input (event )
18071807 ctx ._entity_lock_task_id_map [event_id ] = (entity_id , event .eventId )
0 commit comments