Merge pull request #1792 from loadchange/issues/1759

fix: closes #1759
This commit is contained in:
Fury Zhu 2019-09-17 14:36:42 +08:00 committed by GitHub
commit 117eb6630f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -18,8 +18,8 @@ const request = () => {
},
error => {
if (error.response) {
const { status } = error.response;
Message.error(`HTTP ERROR: ${status}`);
const { data, status } = error.response;
Message.error(data && typeof data === 'string' ? data : `HTTP ERROR: ${status}`);
} else {
Message.error(API_GENERAL_ERROR_MESSAGE);
}

File diff suppressed because one or more lines are too long