-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
🧐[问题 | question] errorThrower 没有作用 #10187
Comments
This was referenced Aug 31, 2022
This was referenced Sep 8, 2022
This was referenced Sep 20, 2022
500 和 404 这些http错误不会进入 errorThrower 的,可以看看源码 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🧐 问题描述 | Problem description
https://umijs.org/docs/max/request
“其中 errorThrower 接收你后端返回的数据并且需要抛出一个你自己设定的 error, 你可以在这里根据后端的数据进行一定的处理。”
测试后端返回错误的时候, 使用
errorThrower
来做初步处理. 然后errorHandler
再后续处理.预期:
应该回进到
errorThrower
然后errorHandler
.实际:
测试只会进到
errorHandler
.测试所用的最新版本的 ant-design pro, 由 ”pro create myapp“ 创建.
💻 示例代码 | Sample code
🚑 其他信息 | Other information
实际只有 requestInterceptors 和 errorHandler 有跑
OS: Mac 12.4
Node:v16.15.1
浏览器 | browser:Chrome
The text was updated successfully, but these errors were encountered: