Skip to content

feat!: name every error class *Error with one casing - #2203

Open
spydon wants to merge 4 commits into
mainfrom
lukasklingsbo/sdk-3374-supabase-py-name-every-error-class
Open

spydon wants to merge 4 commits into
mainfrom
lukasklingsbo/sdk-3374-supabase-py-name-every-error-class

Conversation

@spydon

@spydon spydon commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Renames the error classes so every one ends in Error, starts with its package name and capitalizes acronyms. SDK-3374

  • SupabaseException → SupabaseClientError, StorageException → StorageError, VectorBucketException → StorageVectorBucketError
  • AuthAPIError, AuthInvalidJWTError, StorageAPIError, FunctionsHTTPError, AuthUserDoesNotExistError
  • postgrest gets a PostgrestError root, APIError → PostgrestAPIError, re-exported by supabase without an alias
  • Realtime errors get the Realtime prefix, ResumableUpload*Error the Storage prefix, RequestTimeoutError → SupabaseRequestTimeoutError
  • MIGRATION.md lists the renames

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Introduced consistent, service-specific names for errors across Auth, Functions, PostgREST, Realtime, Storage, and Supabase clients.
    • Added distinct error types for PostgREST errors, client configuration issues, and request timeouts.
  • Documentation
    • Updated migration guidance, examples, and API references to use the current error names.

The PR updates public error names and exports across Auth, Functions, PostgREST, Realtime, Storage, and the Supabase client. It updates error construction and handling references, migration guidance, examples, SDK compliance notes, and tests to use the revised names. The PostgREST package adds a PostgrestError root, and PostgrestAPIError inherits from it and SupabaseAPIError. Existing error conditions and handling are generally retained.

Possibly related PRs

  • supabase/supabase-py#2018: Updates shared error hierarchies and PostgREST, Realtime, and timeout error types that this PR also renames.
  • supabase/supabase-py#1998: Changes SupabaseException, which this PR renames to SupabaseClientError, and updates the Supabase public API exports.

Change: Refactor

Merge Risk: Minimal · up to 6712b

This is a breaking rename of public error classes, documented in the migration guide. No concrete defect was identified. The failing Python 3.14 auth CI check should be confirmed as unrelated or fixed before merge.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e57a3cde-3d05-4118-b10c-4d5537f7a7af
Commits

Reviewing files that changed from the base of the PR and between a346dcf and 6712b74.

Files selected for processing: 126

  • MIGRATION.md
  • examples/taskboard/src/taskboard/__main__.py
  • examples/taskboard/src/taskboard/live.py
  • examples/taskboard/tests/test_board.py
  • sdk-compliance.yaml
  • src/auth/src/supabase_auth/__init__.py
  • src/auth/src/supabase_auth/_sign_out.py
  • src/auth/src/supabase_auth/admin_api.py
  • src/auth/src/supabase_auth/client.py
  • src/auth/src/supabase_auth/errors.py
  • src/auth/src/supabase_auth/helpers.py
  • src/auth/src/supabase_auth/session.py
  • src/auth/tests/_async/test_admin_custom_providers.py
  • src/auth/tests/_async/test_admin_mfa_update_factor.py
  • src/auth/tests/_async/test_admin_sign_out.py
  • src/auth/tests/_async/test_get_claims.py
  • src/auth/tests/_async/test_gotrue.py
  • src/auth/tests/_async/test_gotrue_admin_api.py
  • src/auth/tests/_async/test_initialize_from_url.py
  • src/auth/tests/_async/test_keep_session.py
  • src/auth/tests/_async/test_oauth_server.py
  • src/auth/tests/_async/test_refresh_failures.py
  • src/auth/tests/_async/test_set_session.py
  • src/auth/tests/_async/test_sign_out.py
  • src/auth/tests/_async/test_sso_admin.py
  • src/auth/tests/_sync/test_admin_custom_providers.py
  • src/auth/tests/_sync/test_admin_mfa_update_factor.py
  • src/auth/tests/_sync/test_admin_sign_out.py
  • src/auth/tests/_sync/test_get_claims.py
  • src/auth/tests/_sync/test_gotrue.py
  • src/auth/tests/_sync/test_gotrue_admin_api.py
  • src/auth/tests/_sync/test_initialize_from_url.py
  • src/auth/tests/_sync/test_keep_session.py
  • src/auth/tests/_sync/test_oauth_server.py
  • src/auth/tests/_sync/test_refresh_failures.py
  • src/auth/tests/_sync/test_set_session.py
  • src/auth/tests/_sync/test_sign_out.py
  • src/auth/tests/_sync/test_sso_admin.py
  • src/auth/tests/test_errors.py
  • src/auth/tests/test_helpers.py
  • src/functions/README.md
  • src/functions/src/supabase_functions/__init__.py
  • src/functions/src/supabase_functions/client.py
  • src/functions/src/supabase_functions/errors.py
  • src/functions/tests/_async/test_function_client.py
  • src/functions/tests/_sync/test_function_client.py
  • src/functions/tests/test_client.py
  • src/functions/tests/test_errors.py
  • src/postgrest/src/postgrest/__init__.py
  • src/postgrest/src/postgrest/client.py
  • src/postgrest/src/postgrest/exceptions.py
  • src/postgrest/src/postgrest/request_builder.py
  • src/postgrest/src/postgrest/table_executor.py
  • src/postgrest/src/postgrest/table_request.py
  • src/postgrest/src/postgrest/typed_builder.py
  • src/postgrest/tests/_async/test_filter_request_builder_integration.py
  • src/postgrest/tests/_async/test_typed_query_builder_integration.py
  • src/postgrest/tests/_sync/test_filter_request_builder_integration.py
  • src/postgrest/tests/_sync/test_typed_query_builder_integration.py
  • src/postgrest/tests/test_api_error.py
  • src/postgrest/tests/test_dry_run.py
  • src/postgrest/tests/test_geojson_response.py
  • src/postgrest/tests/test_maybe_single.py
  • src/postgrest/tests/test_request_timeout.py
  • src/postgrest/tests/test_retry.py
  • src/postgrest/tests/test_rpc_query_params.py
  • src/postgrest/tests/test_table_executor.py
  • src/postgrest/tests/test_text_response.py
  • src/realtime/README.md
  • src/realtime/src/realtime/__init__.py
  • src/realtime/src/realtime/channel.py
  • src/realtime/src/realtime/client.py
  • src/realtime/src/realtime/exceptions.py
  • src/realtime/tests/test_broadcast_persist.py
  • src/realtime/tests/test_connection.py
  • src/realtime/tests/test_exceptions.py
  • src/realtime/tests/test_lazy_connection.py
  • src/realtime/tests/test_postgres_changes_wait.py
  • src/realtime/tests/test_presence.py
  • src/realtime/tests/test_push_timeout.py
  • src/realtime/tests/test_reconnection.py
  • src/realtime/tests/test_rejoin.py
  • src/realtime/tests/test_send_failures.py
  • src/realtime/tests/test_transport.py
  • src/storage/README.md
  • src/storage/src/storage3/__init__.py
  • src/storage/src/storage3/client.py
  • src/storage/src/storage3/download.py
  • src/storage/src/storage3/exceptions.py
  • src/storage/src/storage3/file_api.py
  • src/storage/src/storage3/resumable.py
  • src/storage/src/storage3/vectors.py
  • src/storage/tests/_async/test_client.py
  • src/storage/tests/_async/test_resumable.py
  • src/storage/tests/_sync/test_client.py
  • src/storage/tests/_sync/test_resumable.py
  • src/storage/tests/test_analytics.py
  • src/storage/tests/test_client.py
  • src/storage/tests/test_exceptions.py
  • src/storage/tests/test_file_api.py
  • src/storage/tests/test_progress.py
  • src/storage/tests/test_resumable.py
  • src/storage/tests/test_retry.py
  • src/storage/tests/test_streaming.py
  • src/storage/tests/test_types.py
  • src/storage/tests/test_vector_buckets.py
  • src/supabase/README.md
  • src/supabase/src/supabase/__init__.py
  • src/supabase/src/supabase/_keys.py
  • src/supabase/src/supabase/client.py
  • src/supabase/src/supabase/errors.py
  • src/supabase/src/supabase/types.py
  • src/supabase/tests/test_client.py
  • src/supabase/tests/test_exports.py
  • src/supabase/tests/test_url.py
  • src/supabase/tests/test_with_token.py
  • src/utils/README.md
  • src/utils/src/supabase_utils/errors.py
  • src/utils/src/supabase_utils/http/adapters/aiohttp.py
  • src/utils/src/supabase_utils/http/adapters/httpx.py
  • src/utils/src/supabase_utils/http/errors.py
  • src/utils/tests/test_aiohttp_adapter.py
  • src/utils/tests/test_errors.py
  • src/utils/tests/test_httpx_adapter.py
  • src/utils/tests/test_io.py
  • src/utils/tests/test_retry.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@spydon
spydon force-pushed the lukasklingsbo/sdk-3374-supabase-py-name-every-error-class branch 2 times, most recently from 5aad2fb to 6f9be0c Compare December 4, 2026 14:28
@spydon
spydon force-pushed the lukasklingsbo/sdk-3374-supabase-py-name-every-error-class branch from 6f9be0c to 6712b74 Compare December 4, 2026 15:34

This branch has not been deployed

No deployments
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.

1 participant