Skip to content

Commit 5638fac

Browse files
authored
feat: handle CanceledException as TimeoutException (#709)
1 parent 358356b commit 5638fac

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Internal/Client/WorkflowStub.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
use Temporal\DataConverter\DataConverterInterface;
4242
use Temporal\DataConverter\EncodedValues;
4343
use Temporal\DataConverter\ValuesInterface;
44+
use Temporal\Exception\Client\CanceledException;
4445
use Temporal\Exception\Client\ServiceClientException;
4546
use Temporal\Exception\Client\TimeoutException;
4647
use Temporal\Exception\Client\WorkflowException;
@@ -306,7 +307,7 @@ static function (
306307
}
307308

308309
throw WorkflowServiceException::withoutMessage($input->workflowExecution, $input->workflowType, $e);
309-
} catch (TimeoutException $e) {
310+
} catch (TimeoutException|CanceledException $e) {
310311
throw WorkflowUpdateRPCTimeoutOrCanceledException::fromTimeoutOrCanceledException($e);
311312
} catch (\Throwable $e) {
312313
throw new WorkflowServiceException(null, $input->workflowExecution, $input->workflowType, $e);

0 commit comments

Comments
 (0)