Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(studio): await saveRow and surface foreign row errors to UI and Sentry (#44950)

Aditya Kumar Mishracacee2585ba4
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
index cffd091938c..1703e78a279 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
@@ -361,8 +361,15 @@ export const SidePanelEditor = ({
const isNewRecord = false
const configuration = { identifiers, rowIdx: row.idx }
- saveRow(value, isNewRecord, configuration, () => {})
- } catch (error) {}
+ await saveRow(value, isNewRecord, configuration, (error) => {
+ if (error) {
+ toast.error(`Failed to save row: ${error?.message ?? 'Unknown error'}`)
+ }
+ })
+ } catch (error: any) {
+ toast.error(`Failed to save row: ${error?.message ?? 'Unknown error'}`)
+ Sentry.captureException(error, { tags: { workflow: 'save-foreign-row' } })
+ }
}
const saveColumn = async (