未验证 提交 74c40379 编写于 作者: J jiang 提交者: GitHub

401 不需要提示请求错误。

上级 569f1cd9
......@@ -32,11 +32,6 @@ const errorHandler = error => {
const errortext = codeMessage[response.status] || response.statusText;
const { status, url } = response;
notification.error({
message: `请求错误 ${status}: ${url}`,
description: errortext,
});
if (status === 401) {
notification.error({
message: '未登录或登录已过期,请重新登录。',
......@@ -48,6 +43,10 @@ const errorHandler = error => {
});
return;
}
notification.error({
message: `请求错误 ${status}: ${url}`,
description: errortext,
});
// environment should not be used
if (status === 403) {
router.push('/exception/403');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册