Hello,
especially such a scenario's can be handle by applying proper exception handling,
1) May be you can apply retry attempts for all application exception errors, if could not able to control then you can throgh alert to control room by ending the process.
2)to not repeat the cases in case of exceptions create bot such a way using Work Queues and track the status , so that you can restart either manually or bot by checking the status.