-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
Feature: 优化错误输出 #1002
Comments
所以是哪个插件的问题( |
T。。。Telegram |
tg 需要你配个代理。不过这个优化确实可以做。 |
1 similar comment
tg 需要你配个代理。不过这个优化确实可以做。 |
我认为不是配代理的问题,主要是这个错误 log 没有提供任何有意义的帮助,一报错就无限重启,应该在报错的时候输出插件名,让开发者能更好的定位错误。 |
我知道你的意思。但这个优化并不好做,一个错误可能来自一个插件触发的事件在第二个插件注册的回调函数里,错误的成因又是第三个插件提供的 API。目前很难说完全判定某个错误的来源。 所以我希望在保留这个 issue 的同时先尽量解决你的问题本身,再慢慢考虑万全之策。 |
不过我也很好奇,为什么其他报错都带有带有插件名的堆栈,为什么唯独网络请求没有呢?网络请求是使用事件实现的吗? |
大概是因为 |
问题在于,许多逻辑依赖了 isAxiosError,如果构造新的 Error 可能会导致插件判断失败。 |
尝试解决了一下,下个版本实装。 |
之前找了挺久才知道哪里有问题,改了有时间试试 |
Describe the problem related to the feature request
日志根本看不出是哪个插件的问题,然后无限重启,手动 hook 了 axios 才知道是哪个接口 timeout 了
Describe the solution you'd like
优化错误日志输出
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: