Skip to content

fix(storage): propagate vector lookup errors - #1650

Open
hsusul wants to merge 1 commit into
supabase:mainfrom
hsusul:fix/storage-vector-get-errors
Open

hsusul wants to merge 1 commit into
supabase:mainfrom
hsusul:fix/storage-vector-get-errors

Conversation

@hsusul

@hsusul hsusul commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • return None from vector bucket and index lookups only for HTTP 404 responses
  • propagate authorization, rate-limit, and server errors as StorageApiError
  • cover the behavior for both generated sync and async clients

Problem

get_bucket() and get_index() caught every StorageApiError, so a service failure such as HTTP 500 was indistinguishable from a missing resource.

Solution

Keep the existing optional-result behavior for HTTP 404, and re-raise every other API error. The sync implementation and tests are generated from the async source.

Tests

  • regression first: the new bucket and index tests each failed on clean main because no StorageApiError was raised
  • uv run --package storage3 pytest -o addopts= src/storage/tests/_async/test_vectors.py src/storage/tests/_sync/test_vectors.py -q — 6 passed
  • make tests in src/storage — 122 passed; mypy passed
  • uv run ruff check src/storage — passed
  • uv run ruff format --check src/storage — 36 files already formatted
  • uv build --package storage3 — source distribution and wheel built successfully
  • git diff --check — passed

Fixes #1649

cc @olirice @silentworks

@hsusul
hsusul requested review from a team and o-santi as code owners September 19, 2026 05:10

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.

Vector resource lookups hide non-404 API errors

1 participant