Skip to content
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

修复执行errorHandler后还继续抛出error #10671

Closed
wants to merge 1 commit into from

Conversation

leshalv
Copy link

@leshalv leshalv commented Mar 3, 2023

@vercel
Copy link

vercel bot commented Mar 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
umi ⬜️ Ignored (Inspect) Mar 3, 2023 at 2:13AM (UTC)

@leshalv
Copy link
Author

leshalv commented Mar 3, 2023

@fz6m

@@ -262,6 +262,7 @@ const request: IRequest = (url: string, opts: any = { method: 'GET' }) => {
config?.errorConfig?.errorHandler;
if(handler)
handler(error, opts, config);
return;
} catch (e) {
reject(e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看逻辑的话,这里也要 return 下?

@@ -262,6 +262,7 @@ const request: IRequest = (url: string, opts: any = { method: 'GET' }) => {
config?.errorConfig?.errorHandler;
if(handler)
handler(error, opts, config);
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有 handler 时才 return ?那应该加个 {} 包起来吧。

@fz6m
Copy link
Contributor

fz6m commented Jul 4, 2023

感谢 PR ,先关闭了,这个考虑在 #11360 解决。

@fz6m fz6m closed this Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants