diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-17 18:14:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-17 18:14:54 +0300 |
commit | 46d07ca5c2b729d6396723290a875a317b2845ee (patch) | |
tree | cb4c7572244aa2ed873c848b4794ddb1dcfa45a5 /app/assets/javascripts/security_configuration | |
parent | db30b31f056d0de120d9238a7786e19cafbce69f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/security_configuration')
-rw-r--r-- | app/assets/javascripts/security_configuration/components/app.vue | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/security_configuration/components/app.vue b/app/assets/javascripts/security_configuration/components/app.vue index e96f71981e5..ccfaa678201 100644 --- a/app/assets/javascripts/security_configuration/components/app.vue +++ b/app/assets/javascripts/security_configuration/components/app.vue @@ -1,6 +1,7 @@ <script> import { GlTab, GlTabs, GlSprintf, GlLink, GlAlert } from '@gitlab/ui'; import { __, s__ } from '~/locale'; +import { parseErrorMessage } from '~/lib/utils/error_message'; import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue'; import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue'; import SectionLayout from '~/vue_shared/security_configuration/components/section_layout.vue'; @@ -33,6 +34,9 @@ export const i18n = { 'SecurityConfiguration|Enable security training to help your developers learn how to fix vulnerabilities. Developers can view security training from selected educational providers, relevant to the detected vulnerability.', ), securityTrainingDoc: s__('SecurityConfiguration|Learn more about vulnerability training'), + genericErrorText: s__( + `SecurityConfiguration|Something went wrong. Please refresh the page, or try again later.`, + ), }; export default { @@ -124,8 +128,9 @@ export default { dismissedProjects.add(this.projectFullPath); this.autoDevopsEnabledAlertDismissedProjects = Array.from(dismissedProjects); }, - onError(message) { - this.errorMessage = message; + onError(error) { + const { message, userFacing } = parseErrorMessage(error); + this.errorMessage = userFacing ? message : i18n.genericErrorText; }, dismissAlert() { this.errorMessage = ''; |