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

request.js support Promise.stop() #3003

Closed
ChieveiT opened this issue Nov 28, 2018 · 0 comments
Closed

request.js support Promise.stop() #3003

ChieveiT opened this issue Nov 28, 2018 · 0 comments

Comments

@ChieveiT
Copy link

request.js is not good enough when an exception occurs in response, such as 500. The code still run continuelly when an exception has been caught. request.js return undefined in catch(), which finally resolves the promise chaining.

I think it will be more comfortable to intuition if the promise chaining can be stop when it see an exception.

I have used this resolution in my project for a few months. Everything works fine.

Maybe antd pro also like this feature I think? I'm happy to help with a PR if someone like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants