Skip to content

Commit d081125

Browse files
feat: delete workflow erro handling
1 parent 4305022 commit d081125

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/workflowEditor/workflowEditor.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ class WorkflowEdit extends Component<WorkflowEditProps, WorkflowEditState> {
206206
deleteWorkflow = (appId?: string, workflowId?: number) => {
207207
deleteWorkflow(appId || this.props.match.params.appId, workflowId || this.state.workflowId)
208208
.then((response) => {
209+
210+
if(response.errors){
211+
const {errors} = response
212+
const {userMessage} = errors[0]
213+
toast.error(userMessage)
214+
return
215+
}
216+
209217
if (response.status.toLowerCase() === 'ok') {
210218
this.setState({ showDeleteDialog: false })
211219
toast.success('Workflow Deleted')

0 commit comments

Comments
 (0)