Feature request: Action on error

Sometimes Jackett crashes. It would be nice if Sonarr could start a script when it gets an error.
Like for instance. “No reply from indexer” Run script. Script restarts Jackett.