Remove duplicate onError implementation