diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 10:34:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 10:34:06 +0000 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/members/store/mutations.js | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) | |
download | gitlab-ce-859a6fb938bb9ee2a317c46dfa4fcc1af49608f0.tar.gz |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/members/store/mutations.js')
-rw-r--r-- | app/assets/javascripts/members/store/mutations.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/app/assets/javascripts/members/store/mutations.js b/app/assets/javascripts/members/store/mutations.js index 2415e744290..f4aac1571d6 100644 --- a/app/assets/javascripts/members/store/mutations.js +++ b/app/assets/javascripts/members/store/mutations.js @@ -13,10 +13,10 @@ export default { Vue.set(member, 'accessLevel', accessLevel); }, - [types.RECEIVE_MEMBER_ROLE_ERROR](state) { - state.errorMessage = s__( - "Members|An error occurred while updating the member's role, please try again.", - ); + [types.RECEIVE_MEMBER_ROLE_ERROR](state, { error }) { + state.errorMessage = + error.response?.data?.message || + s__("Members|An error occurred while updating the member's role, please try again."); state.showError = true; }, [types.RECEIVE_MEMBER_EXPIRATION_SUCCESS](state, { memberId, expiresAt }) { @@ -28,10 +28,12 @@ export default { Vue.set(member, 'expiresAt', expiresAt); }, - [types.RECEIVE_MEMBER_EXPIRATION_ERROR](state) { - state.errorMessage = s__( - "Members|An error occurred while updating the member's expiration date, please try again.", - ); + [types.RECEIVE_MEMBER_EXPIRATION_ERROR](state, { error }) { + state.errorMessage = + error.response?.data?.message || + s__( + "Members|An error occurred while updating the member's expiration date, please try again.", + ); state.showError = true; }, [types.HIDE_ERROR](state) { |