Show error message correctly on workflow save (#1046)
This commit is contained in:
@@ -219,9 +219,10 @@ function FlowRenderer({
|
|||||||
setHasChanges(false);
|
setHasChanges(false);
|
||||||
},
|
},
|
||||||
onError: (error: AxiosError) => {
|
onError: (error: AxiosError) => {
|
||||||
|
const detail = (error.response?.data as { detail?: string }).detail;
|
||||||
toast({
|
toast({
|
||||||
title: "Error",
|
title: "Error",
|
||||||
description: error.message,
|
description: detail ? detail : error.message,
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user