@supabase/server - v1.7.0
    Preparing search index...

    Class SupabaseServerErrorAbstract

    Base class for every error @supabase/server produces.

    Catch this to handle anything originating from this library, regardless of whether it's an EnvError or an AuthError:

    import { SupabaseServerError } from '@supabase/server'

    try {
    const supabase = createAdminClient()
    } catch (e) {
    if (e instanceof SupabaseServerError) {
    console.error(e.code, e.message, e.hint, e.docs)
    return Response.json(e.toJSON(), { status: e.status })
    }
    throw e
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    source: "@supabase/server" = ErrorSource

    Always "@supabase/server".

    status: number

    HTTP status code appropriate for this error.

    code: string

    Machine-readable error code.

    hint?: string

    Actionable next step, when one applies.

    docs: string

    Documentation URL for this error's code.

    details?: Record<string, unknown>

    Structured, non-sensitive diagnostics — accepted auth modes, which credential headers were present, configured key names, JWT header fields. Never key values or token payloads.

    Methods

    • Returns the wire format — also used implicitly by JSON.stringify, so logging the error yields the full diagnostics rather than {}.

      Returns ErrorPayload