diff --git a/app/[locale]/dashboard/[entityType]/[entitySlug]/collaboratives/edit/[id]/details/page.tsx b/app/[locale]/dashboard/[entityType]/[entitySlug]/collaboratives/edit/[id]/details/page.tsx index d3f9e720..d7f01c53 100644 --- a/app/[locale]/dashboard/[entityType]/[entitySlug]/collaboratives/edit/[id]/details/page.tsx +++ b/app/[locale]/dashboard/[entityType]/[entitySlug]/collaboratives/edit/[id]/details/page.tsx @@ -190,7 +190,11 @@ const Details = () => { }); }, onError: (error: any) => { - toast(`Error: ${error.message}`, { id: COLLAB_DETAILS_TOAST_ID }); + const msg = + error?.response?.errors?.[0]?.message ?? + error?.message ?? + 'Something went wrong'; + toast(`Error: ${msg}`, { id: COLLAB_DETAILS_TOAST_ID }); }, } );