Remove dead code (onError function)