Call onFailure for every exception case even in the case of an error / runtime exception

Closes #2848