temporalio / temporalio/sdk-php

[Feature Request] Use `mapWorkflowFailureToException` for all workflow methods ?

Open
#269 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
421
Forks
64
Avg merge
1d 1h
Merged PRs (30d)
11

Description

Is your feature request related to a problem? Please describe.

I've run into the problem that all methods of the WorkflowStub class, except for the getResult method, don't properly map errors from GRPC.
WorkflowStub.getResult internally makes a call to the $this->mapWorkflowFailureToException() method.

I would like to see something similar for other methods, for example, for the WorkflowStub.cancel method and others.

Additional context

You can check sample with cancelation
You will never get the WorkflowNotFoundException exception, only the ServiceClientException will be thrown.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WorkflowStub methods, comparing getResult and its mapWorkflowFailureToException call with cancel and the other workflow methods. Review the linked cancellation sample to reproduce the error path. Done means the affected methods map gRPC workflow failures consistently and the expected WorkflowNotFoundException is observed instead of only ServiceClientException.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.