Human-readable description. Prefixed with [@supabase/server].
Machine-readable code.
HTTP status. Defaults to 401.
Optionaloptions: SupabaseServerErrorOptionsOptional hint, details, docs, and cause.
ReadonlysourceAlways "@supabase/server".
ReadonlycodeMachine-readable error code.
Optional ReadonlyhintActionable next step, when one applies.
ReadonlydocsDocumentation URL for this error's code.
Optional ReadonlydetailsStructured, non-sensitive diagnostics — accepted auth modes, which credential headers were present, configured key names, JWT header fields. Never key values or token payloads.
ReadonlystatusHTTP status code.
401 — The request's credentials are at fault (MissingCredentialsError,
InvalidApiKeyError, InvalidJwtError).500 — The server is misconfigured (JwksNotConfiguredError,
NoKeysConfiguredError, JwksFetchFailedError,
CreateSupabaseClientError).Returns the wire format — also used implicitly by JSON.stringify, so
logging the error yields the full diagnostics rather than {}.
Thrown when authentication or authorization fails.
Carries an HTTP
statuscode suitable for returning directly in a response (401when the request's credentials are at fault,500when the server is misconfigured and could not have authenticated anyone).Example: Catching an AuthError