onError tests