redux-model
redux-model copied to clipboard
如何在http service做统一的错误日志处理
我看到http service的onError相关参数都是HttpResponse 只有在beforeSend里才有requestOptions 如果要记录log貌似只能在model里面进行
是否可以在onRespondError的时候也能带上request呢
request一般是要拿到里面的什么信息呢?
如果要记录log貌似只能在model里面进行
这句话没看懂
request一般是要拿到里面的什么信息呢?
onRespondError的时候希望能返回当前请求的信息,包括url params等这些请求参数 。
发布9.0.3, https://github.com/redux-model/redux-model/commit/f5e00c413068c19c31cf80ec1a9c5624770ec801 ,行为方式向axios看齐
{
onRespondError(httpResponse, meta) {
console.log(httpResponse.config);
}
}