Skip to content

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

fix: error when telemetry groups unknown (#35403)

Pamela Chia38173acc3467
diff --git a/packages/common/telemetry.tsx b/packages/common/telemetry.tsx
index 29278df8cfa..51e9295aee1 100644
--- a/packages/common/telemetry.tsx
+++ b/packages/common/telemetry.tsx
@@ -172,7 +172,14 @@ export function sendTelemetryEvent(API_URL: string, event: TelemetryEvent, pathn
...getSharedTelemetryData(pathname),
action: event.action,
custom_properties: 'properties' in event ? event.properties : {},
- groups: 'groups' in event ? event.groups : {},
+ groups: 'groups' in event ? { ...event.groups } : {},
+ }
+
+ if (body.groups?.project === 'Unknown') {
+ delete body.groups.project
+ if (body.groups?.organization === 'Unknown') {
+ delete body.groups
+ }
}
return post(`${ensurePlatformSuffix(API_URL)}/telemetry/event`, body, {