Remove duplicate error handling