An Activity, or a child Workflow, might fail, and you could handle errors differently based on the different error cases.
If the Activity returns throws an exception, that exception will
be converted to
Temporal\Exception\Failure\ApplicationFailure and wrapped
It is possible to throw
ApplicationFailure manually with the ability to set
There are other types of exceptions such as
All temporal related exceptions has suffix
Failurefor easier comprehension.
Here's an example of handling Activity errors within Workflow code that differentiates between different error types.