We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8552ce1 commit 6106e50Copy full SHA for 6106e50
src/libs/axios.js
@@ -51,7 +51,16 @@ class HttpRequest {
51
return { data, status }
52
}, error => {
53
this.destroy(url)
54
- addErrorLog(error.response)
+ let errorInfo = error.response
55
+ if (!errorInfo) {
56
+ const { request: { statusText, status }, config } = JSON.parse(JSON.stringify(error))
57
+ errorInfo = {
58
+ statusText,
59
+ status,
60
+ request: { responseURL: config.url }
61
+ }
62
63
+ addErrorLog(errorInfo)
64
return Promise.reject(error)
65
})
66
}
0 commit comments