File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
webpack/JobInvocationDetail/TemplateInvocationComponents Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ const actions = ({
4747 APIActions . post ( {
4848 url : `/foreman_tasks/tasks/${ taskID } /cancel` ,
4949 key : 'CANCEL_TASK' ,
50- errorToast : ( { response } ) => response . data . message ,
50+ errorToast : ( { response } ) =>
51+ response ?. data ?. message || __ ( 'Could not cancel the task' ) ,
5152 successToast : ( ) => __ ( 'Task for the host cancelled succesfully' ) ,
5253 } )
5354 ) ;
@@ -70,7 +71,8 @@ const actions = ({
7071 APIActions . post ( {
7172 url : `/foreman_tasks/tasks/${ taskID } /abort` ,
7273 key : 'ABORT_TASK' ,
73- errorToast : ( { response } ) => response . data . message ,
74+ errorToast : ( { response } ) =>
75+ response ?. data ?. message || __ ( 'Could not abort the task' ) ,
7476 successToast : ( ) => __ ( 'task aborted succesfully' ) ,
7577 } )
7678 ) ;
You can’t perform that action at this time.
0 commit comments