- Knowledge base
- Troubleshooting,Supabase Platform
Updated
Logs API error: Table "<name>" does not exist
Error: Table "<name>" does not exist
When calling /v1/projects/{ref}/analytics/endpoints/logs, the API may return:
{"error": "Table \"<name>\" does not exist."}Cause: Your SQL query references an individual log source (such as edge_logs or function_logs) directly in the FROM clause. You need to use the unified logs table instead.
Resolution
Query the logs table and filter by the source column.
Before:
SELECT count(*) AS n FROM function_logs;After:
SELECT count(*) AS n FROM logs WHERE source = 'function_logs';Example request:
https://api.supabase.com/v1/projects/{project_ref}/analytics/endpoints/logs?sql=select%20count(*)%20as%20n%20from%20logs%20where%20source%3D'function_logs'Supported source values
| Source | Description |
|---|---|
edge_logs | HTTP requests through the API gateway, including REST and GraphQL |
postgres_logs | Database activity, statements, and errors |
postgrest_logs | PostgREST server logs |
auth_logs | Auth server: login, JWT, OAuth, email |
auth_audit_logs | Auth audit events |
storage_logs | Storage API: uploads and object access |
realtime_logs | Realtime server: channels, presence, broadcast |
function_edge_logs | HTTP request and response for an Edge Function invocation |
function_logs | Console output from inside an Edge Function |
supavisor_logs | Shared pooler: pooling and timeouts |
pgbouncer_logs | Dedicated pooler |
pg_upgrade_logs | Database version upgrade |