I have created a Custom Activity using the latest information available from UiPath, but I am encountering an issue where it appears Studio automatically supresses any exception I try to throw.
In this example here, I have a GET request I am sending to an API endpoint (the API is currently down for maintenance) so it is not returning a success status code. This method I am calling throws an exception if the status code is not successful:
From what I can tell, the “ExecuteAsync” method is the “main” method of the activities, or the one that is called upon instantiation of the activity in Studio. If I throw an error in this method, I can validate what you said above:
The issue is that I have my logic segmented in separate protected methods within the Activity class. So none of the errors I throw are in this top-level method. For example, I put this same exception one method deeper in the “ExecuteWithTimeout” method:
If there isn’t an exception it will be null, meaning you can do a check like you see above on whether the completed task was completed due to an exception. If it is, you can rethrow the same exception in this top level and it will appear in Studio: