AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Management API Logs Endpoint Missing Source_name And Failing On SELECT *

After logs.all removal, the unified logs table in the Management API endpoint does not expose source_name and returns backend error for basic SELECT * queries, blocking programmatic Edge Function log access.

highConfidence 60%Supabase Management API

Origin Analysis

The new unified `logs` table in the Management API has either not been fully migrated for this project or has a different column name for source identification (e.g., `source` instead of `source_name`). `SELECT *` triggers a backend error because the endpoint's query engine encounters an unknown or incompatible column, likely due to schema drift between the changelog documentation and the deployed backend.
1. Call GET /v1/projects/{ref}/analytics/endpoints/logs with SQL: SELECT timestamp, event_message FROM logs WHERE source_name = 'edge_logs' ORDER BY timestamp DESC LIMIT 100. 2. Observe error: Field "source_name" does not exist. 3. Call with SELECT * FROM logs ORDER BY timestamp DESC LIMIT 1. 4. Observe error: Backend error! Retry your query. 5. Compare dashboard Logs Explorer which works.

Fixing Code Block

Edge Case Audit

This workaround omits source filtering, so results may include logs from all sources (edge, functions, auth, etc.) and might miss Edge Function logs if the backend does not support the query. The backend error may persist if the underlying schema issue is not addressed. Rollback is to continue using the dashboard Logs Explorer or the old per-source tables if still available. Test with explicit column names and verify schema before relying on the query. Do not use this in production without confirming the returned data meets expectations.

Ecosystem Topology