Skip to content

Commit

Permalink
Merge pull request #469 from jumpserver/pr@v2.4@add_error_message_409
Browse files Browse the repository at this point in the history
fix: 添加409错误信息
  • Loading branch information
xuxinwen authored Nov 2, 2020
2 parents 0a8230b + 93cbbad commit 025b1a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/i18n/langs/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
"Auth": "认证",
"BadRequestErrorMsg": "请求错误,请检查填写内容",
"BadRoleErrorMsg": "请求错误,无该操作权限",
"BadConflictErrorMsg": "正在刷新中,请稍后再试",
"Basic": "基本",
"BasicInfo": "基本信息",
"Cancel": "取消",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
"Auth": "Authorization",
"BadRequestErrorMsg": "Bad request, please check again",
"BadRoleErrorMsg": "Bad request, no permission for this operation",
"BadConflictErrorMsg": "Refreshing, please try again later",
"Basic": "Basic",
"BasicInfo": "Basic info",
"Cancel": "Cancel",
Expand Down
3 changes: 3 additions & 0 deletions src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ function ifBadRequest({ response, error }) {
if (response.status === 403) {
error.message = i18n.t('common.BadRoleErrorMsg')
}
if (response.status === 409) {
error.message = i18n.t('common.BadConflictErrorMsg')
}
}

export function flashErrorMsg({ response, error }) {
Expand Down

0 comments on commit 025b1a4

Please sign in to comment.