add onFailure taking a consumer<T>