Merge branch '2.0'
This commit is contained in:
commit
037c8e820d
|
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue