Job showing Successful even though the Process ran into an Error and a Throw

Hello,

as it says in the Title: I have a Job, which suddenly started running successfully in Orchestrator even though it runs into errors every now and again and also logs all the errors. After every Log I throw a new Businessruleexception, which should and has been working, up until now.
In the Logs I can see: Throw: “my message”, yet it still does not turn the Job to faulted.
Anyone got an Idea?

@kevin.gajic,

This is because your code is handling all the exceptions without faulting your job. You must have used Try Catch to handle all the exceptions. If you want to fault the job, you can Rethrow activity inside your Catch section of the Try Catch activity.

Best practice will be adding email notification or some other notification to business about the error and let the bot job finish successfully.

I only used Check App States and handled the Issues with Closing the used applications and then following with a Throw.
I am not sure if I would just need to build it from ground up as a new workflow.

Hi @kevin.gajic

Pls check this:

Happy Automation

@kevin.gajic
Are you using REFramework?

I will look into it. Thank you

We have our own Framework my colleague built up for our needs. So nothing thats given by UiPath.

@kevin.gajic,

Okey, not a good practice but as you need it, I would suggest to add Rethrow activity in each Catch block you see that will throw the exception to the topmost sequence and eventually fault the job

Alright. Will have a look into it. Thank you lots!