Hide generic Error message

Hi everyone.
How do I hide the generic message that pops up when an error occurs and show a custom message instead? And there used to be an Error object (forget what it was called) that you could refer to, but that seems to have gone as well.

Anyone?

Cheers,
Jeppe

Hi @jjes

As per my knowledge,
Use a Try-Catch activity to handle errors and show a custom message. Place your workflow inside the Try block. In the Catch block, select System.Exception and use a Log Message or Message Box to display your custom message. You can also use exception.Message to get error details.

Happy Automation

Use try catch block

place your code in the Try block

In the catch block - use throw activity

inside throw - use New exception(“Your custom message”)

@jjes

Does this apply to UiPath Apps? Don’t think so.

Please read questions and consider which category the question is asked.

Does this apply to UiPath Apps? Don’t think so.

My bad

For Capturing errors at runtime

To capture an error thrown by a process or API at runtime, use the following expressions in a control:

  • <PageName>.<ControlName>.<ProcessName>.Error for capturing a process integration error.

  • <PageName>.<ControlName>.<API>.Error for capturing an API integration error.

based on the value of above expression, I believe you could throw custom error

I haven’t tried this from my side. So kindly try and let me know your feedback