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 如何区分不同返回码的错误? #39

Open
zuoRambo opened this issue Jul 9, 2018 · 2 comments
Open

request.js 如何区分不同返回码的错误? #39

zuoRambo opened this issue Jul 9, 2018 · 2 comments

Comments

@zuoRambo
Copy link

zuoRambo commented Jul 9, 2018

image
如上图,意味着客户端只识别code == -1 为失败,其余都是成功,我理解应该是 code == 0算成功,剩下都是失败。
请问这种情况下,服务端及客户端如何因多种多样的问题导致的不同错误呢?

@jas0ncn
Copy link
Contributor

jas0ncn commented Jul 15, 2018

request.js 只是根据配合的 SDK 进行了处理,关于状态码的建议自行封装

@jas0ncn
Copy link
Contributor

jas0ncn commented Jul 15, 2018

SDK 中 code 为 1 代表着没有登录态。。其他状态码暂未用到

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