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

✨ [Feature]: Axios配置添加错误状态码的配置 #223

Closed
YuPeng6688 opened this issue Nov 5, 2024 · 3 comments
Closed

✨ [Feature]: Axios配置添加错误状态码的配置 #223

YuPeng6688 opened this issue Nov 5, 2024 · 3 comments

Comments

@YuPeng6688
Copy link

What problem does this feature solve

用户更好的使用错误状态码路由拦截这一块的样式,真正做到“开箱即用”

What does the proposed API look like

axios的请求状态码错误或者报错了,弹出一些已经配置好的错误提示,不用用户在自己额外书写
image

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: ✨ [Feature]: Axios configuration adds error status code configuration

@GaoNeng-wWw
Copy link
Collaborator

GaoNeng-wWw commented Nov 13, 2024

错误提示更推荐在后端进行操作,因为报错行为本身是后端发起的。后端只需要拿到请求头, 根据请求头来判断返回的国际化词条即可

#197

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Error prompts are more recommended to be operated on the backend, because the error reporting behavior itself is initiated by the backend. The backend only needs to get the request header and judge the returned internationalized entry based on the request header.

#180

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

3 participants