removing empty onError clauses