Catch "Activity Timeout Exceeded"

Hi!

I am creating a validation workflow that runs another workflow within a try-catch statement and logs problems. Often the routine terminates with Error: “Activity timeout exceeded”. Is there anyway to catch this? I dont want the routine to terminate, but rather restart the validation process. I am catching system.TimeoutException in the try-catch statement but it doesn’t seem to help.

1 Like

Hello @Mathias_Osterlund.

Under the catch segment, select System.Exception.
Then under it, use an If statement.
If exception.Message.Contains("Activity timeout exceeded")

6 Likes

Hi @Mathias_Osterlund

Welcome to uipath community, that’s a good question to start with
Fine
— you were almost done
— keep all the process that validates in the try block
— In the catch block include a exception like system.Exception and this is done to take any exception including the one you were mentioning like activity timeout error, this catch block will take the exception and will let you perform the activities placed within the catch block the moment when exception occurs with activities in try block
— as you wish to perform again with the process
Again in the catch block include all the activities that are there in the try block
So that when exception occurs it will come to catch and perform the actions again

Hope this would help you
Cheers @Mathias_Osterlund

3 Likes

Thanks for answer!

I am already catching System.Exception and I dont see how that if-statement should help. My understanding is that just catching exceptions should result in them not creating an error.

EDIT: apparently I was catching System.systemException. I will try catching System.Exception and see if it works better. Thanks for answers

1 Like

If you don’t want it to generate an error, set ContinueOnError property of the activity to True

6 Likes

Had the same issue. My solution was to use the Run instead of Debug. This way it does not stop at the failing activity.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.