New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handled error in onError ? #40
Comments
A request must correspond to a response, even if it failed. dio.get(...).then((r)=>print(r)) |
@wendux 请求需要做单独的异常处理还必须得用await,不能用then。使用then,有异常catch不到,能不能不抛出异常而是返回一个异常状态,直接用then获取处理,比如这样 |
onError 返回Response 就可以 |
Dear author, i handled error in
onError
, so i don't want usetry catch
it again in my code. How to do that ?i tried
return null;
inonError
but not work.currently i must do this to ignore exception, because it was handled as above:
The text was updated successfully, but these errors were encountered: