If this happens frequently, it could be indicative of some other problem. That said, this error is almost certainly being logged, and there may be a way to get the log file to fire an event which you can use to trigger an automation. Take a look at this topic for some examples.