From b1aef0afb0ab685863bf03fd96571ca7e8acb8c7 Mon Sep 17 00:00:00 2001 From: Dmitriy Derepko Date: Mon, 9 Feb 2026 18:35:45 +0400 Subject: [PATCH] feat: handle CanceledException as TimeoutException --- src/Internal/Client/WorkflowStub.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Internal/Client/WorkflowStub.php b/src/Internal/Client/WorkflowStub.php index 009d3b65c..2c6f84a11 100644 --- a/src/Internal/Client/WorkflowStub.php +++ b/src/Internal/Client/WorkflowStub.php @@ -41,6 +41,7 @@ use Temporal\DataConverter\DataConverterInterface; use Temporal\DataConverter\EncodedValues; use Temporal\DataConverter\ValuesInterface; +use Temporal\Exception\Client\CanceledException; use Temporal\Exception\Client\ServiceClientException; use Temporal\Exception\Client\TimeoutException; use Temporal\Exception\Client\WorkflowException; @@ -301,7 +302,7 @@ static function ( } throw WorkflowServiceException::withoutMessage($input->workflowExecution, $input->workflowType, $e); - } catch (TimeoutException $e) { + } catch (TimeoutException|CanceledException $e) { throw WorkflowUpdateRPCTimeoutOrCanceledException::fromTimeoutOrCanceledException($e); } catch (\Throwable $e) { throw new WorkflowServiceException(null, $input->workflowExecution, $input->workflowType, $e);