Browse Source

fix: requestErrorConfig在发生异常时,message.error不自动关闭 (#10209)

pull/10257/head
Yanghc 4 years ago
committed by GitHub
parent
commit
4c191edffe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/requestErrorConfig.ts

2
src/requestErrorConfig.ts

@ -72,7 +72,7 @@ export const errorConfig: RequestConfig = {
} else if (error.response) {
// Axios 的错误
// 请求成功发出且服务器也响应了状态码,但状态代码超出了 2xx 的范围
message.error('Response status:', error.response.status);
message.error(`Response status:${error.response.status}`);
} else if (error.request) {
// 请求已经成功发起,但没有收到响应
// \`error.request\` 在浏览器中是 XMLHttpRequest 的实例,

Loading…
Cancel
Save