throw exception or onError?