Is there a way to propagate original Application Exception class to the client?

I have a worker that connects to database to execute query on the clients database.
I want to be able to handle original exceptions that happen on the worker. Is there a way to this?

For example if I submit SELECT 1/0 from table_name I should be able to catch ProcessingZeroDivisionQueryError not temporalio.exceptions.ApplicationError.

From what i see all I have on the client just a traceback of the original exception. Do I have to parse the sting of the traceback to receive original exception?

Hi @Igor_Polynets1

I want to be able to handle original exceptions that happen on the worker. Is there a way to this?

This is not currently possible, errors thrown from activities and workflows (if non-retriable) are wrapped into a Temporal Failure

As this sample code suggests, you can inspect the internal fields to extract the information

Do I have to parse the sting of the traceback to receive original exception?

Please see the comment here and the linked issue.

Antonio

1 Like