Is there a way to disable the error message when process fails while running attended robot?

My goal is to flag the job status as faulted in Orchestrator if an unexpected error occurs so that it can be further investigated. The process is manually triggered from the machine, so if an unhandled error is thrown, it displays the detailed error message. Is there a way to disable this message while still changing the job state in Orchestrator?

Jobs triggered from Orchestrator do not show an error message on the machine. This is the behaviour what I want to accomplish but for locally triggered processes instead.

Any help would be appreciated, thanks.

Well,

If your intention is a graceful exit then surround your workflow with a ‘try catch’ and in the ‘catch’ clock select ‘System.Exception’ and there you can log the ‘exception.message’ or ‘exception.source’.

If it is attended then how are you triggering it from orchestrator? Schedules or monitor events… If it is monitor events then how can you trigger it from Orch. bit unclear on that part, more details would be easier to diagnose the issue.

I guess if your goal is a graceful exit then try catch with a system exception should fix it.

Regards :slight_smile:

Hi, thanks for the response.

What I said may have been confusing so I’ll try to clear it up. The process is not triggered from Orchestrator, but I would like to monitor the success of the process from Orchestrator. The process is to be triggered locally from the robot tray.

My intention is in fact a graceful exit when an unexpected error occurs. The local user does not need the specific error details, but someone else can view the logs for any faulted processes and investigate the root cause.

Well that settles it.

Wrap your whole workflow in a Try catch activity like i mentioned and it will not throw any errors. You can log the source of the exception also.

Yes, I’m aware that I can do this.

However, is there any way to change to job state to “Faulted”? Right now, if I do what you suggested, it is marked as “Successful”

I appreciate the help

You are correct. The graceful exit will not flag the job as Faulted, so you want the error thrown at the end of the fault.

I don’t think there is a feature that will fault the job, but you can put it in the Queue which the individual item can be Failed, however the job would be Successful (not ideal either). On the other hand, you are not using Orchestrator.

So I guess there is a trade-off. Either fault it with an error or don’t and have it be Successful. - maybe you can send a notification that it failed. Unless you need it to be in a Faulted state for analytics, then that wouldn’t be the best choice.

1 Like

Additionally, it would be beneficial if you have recovery built in the bot, where if a failure occurs, it will attempt a retry up to a certain amount of retries. This will lower the number of chances an error occurs.

Well,

If you want a more established design for an attended bot you can check this out _

Also, you can only set success or failure in Orch. if you re using queue items, but if you really want whether it failed or succeeded and not actually notify the user then notification for high priority usecase and a logging folder for execution for low priority can be coded.

Regards :slight_smile:

Hi,
Use Try catch block for your entire code block in UiPath Studio. Catch block dont do anything. The Orchestrator will show the status as “Succefull”.

1 Like