File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -125,11 +125,13 @@ async def run_in_pe_thread() -> Command:
125
125
)
126
126
127
127
if command .error is not None :
128
- error_was_recovered_from = (
128
+ error_recovery_type = (
129
129
self ._engine .state_view .commands .get_error_recovery_type (command .id )
130
- == ErrorRecoveryType .WAIT_FOR_RECOVERY
131
130
)
132
- if not error_was_recovered_from :
131
+ error_should_fail_run = (
132
+ error_recovery_type == ErrorRecoveryType .FAIL_RUN
133
+ )
134
+ if error_should_fail_run :
133
135
error = command .error
134
136
# TODO: this needs to have an actual code
135
137
raise ProtocolCommandFailedError (
Original file line number Diff line number Diff line change @@ -391,13 +391,15 @@ async def _add_and_execute_commands(self) -> None:
391
391
)
392
392
)
393
393
if executed_command .error is not None :
394
- error_was_recovered_from = (
394
+ error_recovery_type = (
395
395
self ._protocol_engine .state_view .commands .get_error_recovery_type (
396
396
executed_command .id
397
397
)
398
- == ErrorRecoveryType .WAIT_FOR_RECOVERY
399
398
)
400
- if not error_was_recovered_from :
399
+ error_should_fail_run = (
400
+ error_recovery_type == ErrorRecoveryType .FAIL_RUN
401
+ )
402
+ if error_should_fail_run :
401
403
raise ProtocolCommandFailedError (
402
404
original_error = executed_command .error ,
403
405
message = f"{ executed_command .error .errorType } : { executed_command .error .detail } " ,
You can’t perform that action at this time.
0 commit comments