diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-19 21:09:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-19 21:09:33 +0300 |
commit | d1be3e6f776e1c77976537548c1daa9af2fb2650 (patch) | |
tree | 387d3c8f06e18bbfa24a4b0b015a7245e166927c /app/assets/javascripts/ml/model_registry/components/candidate_list.vue | |
parent | 8f3a9dbb94b5a9ae4570a22bbc2a75e7572407c8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ml/model_registry/components/candidate_list.vue')
-rw-r--r-- | app/assets/javascripts/ml/model_registry/components/candidate_list.vue | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/app/assets/javascripts/ml/model_registry/components/candidate_list.vue b/app/assets/javascripts/ml/model_registry/components/candidate_list.vue index fca4462d7d2..d05a827c545 100644 --- a/app/assets/javascripts/ml/model_registry/components/candidate_list.vue +++ b/app/assets/javascripts/ml/model_registry/components/candidate_list.vue @@ -35,8 +35,7 @@ export default { return data.mlModel?.candidates ?? {}; }, error(error) { - this.errorMessage = makeLoadCandidatesErrorMessage(error.message); - Sentry.captureException(error); + this.handleError(error); }, }, }, @@ -67,12 +66,18 @@ export default { ...newPageInfo, }; - this.$apollo.queries.candidates.fetchMore({ - variables, - updateQuery: (previousResult, { fetchMoreResult }) => { - return fetchMoreResult; - }, - }); + this.$apollo.queries.candidates + .fetchMore({ + variables, + updateQuery: (previousResult, { fetchMoreResult }) => { + return fetchMoreResult; + }, + }) + .catch(this.handleError); + }, + handleError(error) { + this.errorMessage = makeLoadCandidatesErrorMessage(error.message); + Sentry.captureException(error); }, }, i18n: { |