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

后端返回400 拿不到返回的response信息,request.js里面直接跳到error,求问怎么解决 #3386

Closed
AllenZhang34 opened this issue Aug 16, 2020 · 4 comments

Comments

@AllenZhang34
Copy link

我想拿后端返回给我的错误信息,然后在前端显示出来,后端返回是400,但是我拿不到response
直接跳到error了,返回的也不是后端的信息,求问怎么解决,谢谢🙏

截屏2020-08-16 下午9 49 51

@KeJunMao
Copy link

response interceptor 注释掉

@AllenZhang34
Copy link
Author

response interceptor 注释掉

不好意思,我没太看明白,请问下具体是注释哪一部分?
麻烦您再稍微解答一下,谢谢了🙏

@KeJunMao
Copy link

axios 的拦截器,如果你想要在 response.status === 400 的时候给用户个提示,也可以在拦截器里改,具体可以看看文档

@AllenZhang34
Copy link
Author

axios 的拦截器,如果你想要在 response.status === 400 的时候给用户个提示,也可以在拦截器里改,具体可以看看文档

非常感谢 已经解决

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

No branches or pull requests

2 participants