Added require onError