Commit 9ea0202e authored by Jose Vargas's avatar Jose Vargas

Add sentry trigger to action_component

parent 9e58ebb2
...@@ -4,6 +4,7 @@ import axios from '~/lib/utils/axios_utils'; ...@@ -4,6 +4,7 @@ import axios from '~/lib/utils/axios_utils';
import { dasherize } from '~/lib/utils/text_utility'; import { dasherize } from '~/lib/utils/text_utility';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { deprecatedCreateFlash as createFlash } from '~/flash'; import { deprecatedCreateFlash as createFlash } from '~/flash';
import { reportToSentry } from './utils';
/** /**
* Renders either a cancel, retry or play icon button and handles the post request * Renders either a cancel, retry or play icon button and handles the post request
...@@ -70,10 +71,12 @@ export default { ...@@ -70,10 +71,12 @@ export default {
this.$emit('pipelineActionRequestComplete'); this.$emit('pipelineActionRequestComplete');
}) })
.catch(() => { .catch((err) => {
this.isDisabled = false; this.isDisabled = false;
this.isLoading = false; this.isLoading = false;
reportToSentry('action_component', err);
createFlash(__('An error occurred while making the request.')); createFlash(__('An error occurred while making the request.'));
}); });
}, },
......
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