I refer to the guide posted here: https://www.uipath.com/kb-articles/how-to-download-a-file-from-a-server
I am using method 2 to download excel files from my server. it works as expected when download is successful.
However, if for whatever reason, if unsuccessful, the downloaded file would be in html format with the error for example,
how do I get UiPath to tell me its an error/throw an exception instead of just saving the server response as an excel file?