diff --git a/front/components/poke/features/columns.tsx b/front/components/poke/features/columns.tsx index 58993377f232..85ff1cf4681b 100644 --- a/front/components/poke/features/columns.tsx +++ b/front/components/poke/features/columns.tsx @@ -69,18 +69,15 @@ async function toggleFeatureFlag( }), }); if (!r.ok) { - throw new Error("Failed to disable feature."); + const error: { error: { message: string } } = await r.json(); + throw new Error(error.error.message); } reload(); } catch (e) { sendNotification({ title: "Error", - description: `An error occurred while toggling feature "${feature}": ${JSON.stringify( - e, - null, - 2 - )}`, + description: `An error occurred while toggling feature "${feature}": ${e}`, type: "error", }); }