Skip to content

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

Add check in SqlRowService fetchPage to resolve https://sentry.io/organizations/supabase/issues/3453539176

Joshen Lim2677f8bc2a44
diff --git a/studio/components/grid/services/row/SqlRowService.ts b/studio/components/grid/services/row/SqlRowService.ts
index d66f18a52a0..993ace53495 100644
--- a/studio/components/grid/services/row/SqlRowService.ts
+++ b/studio/components/grid/services/row/SqlRowService.ts
@@ -105,11 +105,15 @@ export class SqlRowService implements IRowService {
if (error) {
this.onError(error)
return { data: { rows: [] } }
- } else {
+ } else if (Array.isArray(data)) {
const rows = data?.map((x: any, index: number) => {
return { idx: index, ...x } as SupaRow
})
return { data: { rows } }
+ } else {
+ console.error('Fetch page:', data)
+ this.onError({ message: 'Data received is not formatted properly' })
+ return { data: { rows: [] } }
}
}