Put a guard in workflow save error detail (#1326)

This commit is contained in:
Shuchang Zheng
2024-12-05 08:41:26 -08:00
committed by GitHub
parent 5374aa32f9
commit b99094adef

View File

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