We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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:function(err){ console.log(err) }
err永远都是字符串,这个逻辑实在摸不透!
The text was updated successfully, but these errors were encountered:
当 requestInterceptors、responseInterceptors 或者其他 middlewares 代码执行过程中遇到错误时抛出的异常,包括 Promise.reject 或者 throw new Error("xxx") 都会被 errorHandler 所捕获。
requestInterceptors
responseInterceptors
middlewares
Promise.reject
throw new Error("xxx")
errorHandler
如果中间件没有做特殊处理的话,只有网络请求本身发生错误 errorHandler 中获取到的才是 ResponseError 类型;否则捕获到的是 Promise.reject 或者 throw 抛出的内容
Sorry, something went wrong.
No branches or pull requests
errorHandler:function(err){
console.log(err)
}
err永远都是字符串,这个逻辑实在摸不透!
The text was updated successfully, but these errors were encountered: