Show error message correctly on workflow save (#1046)

This commit is contained in:
Shuchang Zheng
2024-10-24 05:34:54 -07:00
committed by GitHub
parent 805ff9f553
commit afae80f686

View File

@@ -219,9 +219,10 @@ function FlowRenderer({
setHasChanges(false);
},
onError: (error: AxiosError) => {
const detail = (error.response?.data as { detail?: string }).detail;
toast({
title: "Error",
description: error.message,
description: detail ? detail : error.message,
variant: "destructive",
});
},