Skip to content

fix: restore storage and httpx_client fields on ClientOptions#1467

Closed
Nikhil-jaiswal007 wants to merge 1 commit intosupabase:mainfrom
Nikhil-jaiswal007:fix/client-options-missing-storage-httpx-client
Closed

fix: restore storage and httpx_client fields on ClientOptions#1467
Nikhil-jaiswal007 wants to merge 1 commit intosupabase:mainfrom
Nikhil-jaiswal007:fix/client-options-missing-storage-httpx-client

Conversation

@Nikhil-jaiswal007
Copy link
Copy Markdown

ClientOptions was missing storage and httpx_client fields in v2.28.3, causing Attribute Error when creating a client with custom options. Fixes #1466

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

In v2.28.3, creating a Supabase client with custom ClientOptions raises:

AttributeError: 'ClientOptions' object has no attribute 'storage'

This happens because the base ClientOptions dataclass is missing the storage and httpx_client fields that Client.init tries to access.

Fixes #1466

What is the new behavior?

The base ClientOptions dataclass now includes storage and httpx_client fields with sensible defaults, consistent with SyncClientOptions and AsyncClientOptions.

Example that now works:

from supabase import create_client
from supabase.lib.client_options import ClientOptions

opts = ClientOptions(headers={"Authorization": "Bearer "})
client = create_client("http://localhost:54321", "anon-key", options=opts)

Additional context

This is a recurring regression — the same bug appeared in v2.22.0, was fixed in v2.23.0, reintroduced in v2.24.0 (issue #1306), and has now reappeared in v2.28.3 (issue #1466).

ClientOptions was missing storage and httpx_client fields in v2.28.3,
causing AttributeError when creating a client with custom options.

Fixes supabase#1466
@o-santi o-santi closed this Apr 20, 2026
@Nikhil-jaiswal007 Nikhil-jaiswal007 deleted the fix/client-options-missing-storage-httpx-client branch April 21, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ClientOptions missing storage and httpx_client attributes in v2.28.3

2 participants