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)