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 { ...@@ -98,17 +98,14 @@ export default {
}, },
onError(error) { onError(error) {
const { message } = error; const { message } = error;
createAlert({ message });
this.reportToSentry(error); createAlert({ message });
captureException({ error, component: this.$options.name });
}, },
onSuccess(token) { onSuccess(token) {
this.$toast?.show(s__('Runners|New registration token generated!')); this.$toast?.show(s__('Runners|New registration token generated!'));
this.$emit('tokenReset', token); this.$emit('tokenReset', token);
}, },
reportToSentry(error) {
captureException({ error, component: this.$options.name });
},
}, },
}; };
</script> </script>
......
...@@ -116,11 +116,8 @@ export default { ...@@ -116,11 +116,8 @@ export default {
}, },
onError(error) { onError(error) {
const { message } = error; const { message } = error;
createAlert({ message });
this.reportToSentry(error); createAlert({ message });
},
reportToSentry(error) {
captureException({ error, component: this.$options.name }); captureException({ error, component: this.$options.name });
}, },
}, },
......
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
}, },
error(error) { error(error) {
createAlert({ message: I18N_FETCH_ERROR }); createAlert({ message: I18N_FETCH_ERROR });
this.reportToSentry(error); captureException({ error, component: this.$options.name });
}, },
}, },
}, },
...@@ -62,11 +62,6 @@ export default { ...@@ -62,11 +62,6 @@ export default {
return this.$apollo.queries.jobs.loading; return this.$apollo.queries.jobs.loading;
}, },
}, },
methods: {
reportToSentry(error) {
captureException({ error, component: this.$options.name });
},
},
I18N_NO_JOBS_FOUND, I18N_NO_JOBS_FOUND,
}; };
</script> </script>
......
...@@ -92,11 +92,8 @@ export default { ...@@ -92,11 +92,8 @@ export default {
}, },
onError(error) { onError(error) {
const { message } = error; const { message } = error;
createAlert({ message });
this.reportToSentry(error); createAlert({ message });
},
reportToSentry(error) {
captureException({ error, component: this.$options.name }); captureException({ error, component: this.$options.name });
}, },
}, },
......
...@@ -55,8 +55,7 @@ export default { ...@@ -55,8 +55,7 @@ export default {
}, },
error(error) { error(error) {
createAlert({ message: I18N_FETCH_ERROR }); createAlert({ message: I18N_FETCH_ERROR });
captureException({ error, component: this.$options.name });
this.reportToSentry(error);
}, },
}, },
}, },
...@@ -77,11 +76,6 @@ export default { ...@@ -77,11 +76,6 @@ export default {
}); });
}, },
}, },
methods: {
reportToSentry(error) {
captureException({ error, component: this.$options.name });
},
},
I18N_NONE, I18N_NONE,
}; };
</script> </script>
......
...@@ -82,9 +82,9 @@ export default { ...@@ -82,9 +82,9 @@ export default {
this.onSuccess(); this.onSuccess();
} catch (error) { } catch (error) {
const { message } = error; const { message } = error;
createAlert({ message });
this.reportToSentry(error); createAlert({ message });
captureException({ error, component: this.$options.name });
} finally { } finally {
this.saving = false; this.saving = false;
} }
...@@ -93,9 +93,6 @@ export default { ...@@ -93,9 +93,6 @@ export default {
createAlert({ message: __('Changes saved.'), variant: VARIANT_SUCCESS }); createAlert({ message: __('Changes saved.'), variant: VARIANT_SUCCESS });
this.model = runnerToModel(this.runner); this.model = runnerToModel(this.runner);
}, },
reportToSentry(error) {
captureException({ error, component: this.$options.name });
},
}, },
ACCESS_LEVEL_NOT_PROTECTED, ACCESS_LEVEL_NOT_PROTECTED,
ACCESS_LEVEL_REF_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