Commit 9974b1b4 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'mrincon/remove-extra-methods' into 'master'

Remove unnecessary reportToSentry methods

See merge request gitlab-org/gitlab!81124
parents bdebbc63 f65074e6
......@@ -98,17 +98,14 @@ export default {
},
onError(error) {
const { message } = error;
createAlert({ message });
this.reportToSentry(error);
createAlert({ message });
captureException({ error, component: this.$options.name });
},
onSuccess(token) {
this.$toast?.show(s__('Runners|New registration token generated!'));
this.$emit('tokenReset', token);
},
reportToSentry(error) {
captureException({ error, component: this.$options.name });
},
},
};
</script>
......
......@@ -116,11 +116,8 @@ export default {
},
onError(error) {
const { message } = error;
createAlert({ message });
this.reportToSentry(error);
},
reportToSentry(error) {
createAlert({ message });
captureException({ error, component: this.$options.name });
},
},
......
......@@ -46,7 +46,7 @@ export default {
},
error(error) {
createAlert({ message: I18N_FETCH_ERROR });
this.reportToSentry(error);
captureException({ error, component: this.$options.name });
},
},
},
......@@ -62,11 +62,6 @@ export default {
return this.$apollo.queries.jobs.loading;
},
},
methods: {
reportToSentry(error) {
captureException({ error, component: this.$options.name });
},
},
I18N_NO_JOBS_FOUND,
};
</script>
......
......@@ -92,11 +92,8 @@ export default {
},
onError(error) {
const { message } = error;
createAlert({ message });
this.reportToSentry(error);
},
reportToSentry(error) {
createAlert({ message });
captureException({ error, component: this.$options.name });
},
},
......
......@@ -55,8 +55,7 @@ export default {
},
error(error) {
createAlert({ message: I18N_FETCH_ERROR });
this.reportToSentry(error);
captureException({ error, component: this.$options.name });
},
},
},
......@@ -77,11 +76,6 @@ export default {
});
},
},
methods: {
reportToSentry(error) {
captureException({ error, component: this.$options.name });
},
},
I18N_NONE,
};
</script>
......
......@@ -82,9 +82,9 @@ export default {
this.onSuccess();
} catch (error) {
const { message } = error;
createAlert({ message });
this.reportToSentry(error);
createAlert({ message });
captureException({ error, component: this.$options.name });
} finally {
this.saving = false;
}
......@@ -93,9 +93,6 @@ export default {
createAlert({ message: __('Changes saved.'), variant: VARIANT_SUCCESS });
this.model = runnerToModel(this.runner);
},
reportToSentry(error) {
captureException({ error, component: this.$options.name });
},
},
ACCESS_LEVEL_NOT_PROTECTED,
ACCESS_LEVEL_REF_PROTECTED,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment