Skip to content

Commit

Permalink
Merge branch '2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhigang.li committed Nov 20, 2018
2 parents 2c08ea1 + 6106e50 commit 037c8e8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/libs/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,16 @@ class HttpRequest {
return { data, status }
}, error => {
this.destroy(url)
addErrorLog(error.response)
let errorInfo = error.response
if (!errorInfo) {
const { request: { statusText, status }, config } = JSON.parse(JSON.stringify(error))
errorInfo = {
statusText,
status,
request: { responseURL: config.url }
}
}
addErrorLog(errorInfo)
return Promise.reject(error)
})
}
Expand Down

0 comments on commit 037c8e8

Please sign in to comment.