remove unused onFailure argument