For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.

Server: ErrorResponseConfig

Controls how much of an error goes in the response body. Accepted as errors by withSupabase and by every middleware that answers a request directly: withClaims, withRequiredClaims, withPostgresClient, withPostgresAdminClient and withOAuthProtectedResource.

Parameters

Examples

Trimming the response

// Full payload: source, code, message, hint, docs, details
withSupabase({ auth: 'user' }, handler)

// Trimmed: code and message only
withSupabase({ auth: 'user', errors: { detailed: false } }, handler)