Commit 66d59969 authored by afc163's avatar afc163

More notification when api failed

parent c771ea29
......@@ -5,6 +5,10 @@ function checkStatus(response) {
if (response.status >= 200 && response.status < 300) {
return response;
}
notification.error({
message: `请求错误 ${response.status}: ${response.url}`,
description: response.statusText,
});
const error = new Error(response.statusText);
error.response = response;
throw error;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment