Hi! Kinda new to this, so please bear with me. (I have learned so much from y’all already, but couldn’t find anything on this situation)
I am having troubles with a nested Try/Catch structure where the second Try/Catch is in a flow service invoked from the main Catch. I am trying to handle a database connection error and send an email to the users with a notification.
-Try1 (Exit on Failure)
– Database Read
– (other stuff)
– Exit Try1
-Catch1 (Exit on Done)
– Build Email text
– Invoke EmailService
— (Inside EmailService)
---- Try2 (Exit on Failure)
----- Format and Send email
---- Catch2 (Exit on Done)
----- Format and send failure email
— (End EmailService)
The problem comes in when I invoke the EmailService. The Try2/Catch2 inside the EmailService is picking up the error from Try1/Catch1 and forcing the flow into Catch2.
By the time the EmailService is called, I no longer need the error details.
So, is there a way to either “Clear” the error before I invoke the EmailService OR can I somehow scope the EmailService so it will ignore the original error and only handle its own errors?
Any help would be greatly appreciated.