• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-py / 40964080161
96%

Build:
DEFAULT BRANCH: main
Ran 29 Oct 2026 10:13PM UTC
Jobs 36
Files 161
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Oct 2026 10:12PM UTC coverage: 94.98% (+0.02%) from 94.956%
40964080161

push

github

web-flow
fix(storage): read object info in exists() so auth and bucket errors raise (#1825)

**What kind of change does this PR introduce?**

Bug fix. Closes https://github.com/supabase/supabase-py/issues/1821

**What is the current behavior?**

`exists()` sends a HEAD request and returns `False` for any 400 or 404,
so an invalid JWT or a missing bucket is reported as a missing file.

**What is the new behavior?**

`exists()` reads the object info, matching
https://github.com/supabase/supabase-js/pull/2783. It returns `False`
only for a 404 `not_found` or a 404 without a parsable body, and raises
`StorageApiError` for everything else (invalid JWT, missing bucket,
other statuses).

On `main`, `StorageApiError.code` comes from the body's `error` field,
so the missing-object check uses `not_found` rather than `NoSuchKey`.
Once the v3 error parsing (`code or error`) lands, this can check
`NoSuchKey` the same way supabase-js does. Happy to port this to the v3
branch too.

**Additional context**

- Changed `_async/file_api.py`; `_sync/` matches the storage
`build-sync` output plus ruff.
- Replaced the two unit tests that asserted a bodiless 400 means
"missing". Added sync and async tests mirroring the supabase-js cases:
found, `NoSuchKey`, 404 without a code, bodiless 404, `InvalidJWT`,
`NoSuchBucket`, bodiless 400 and 401.
- `mypy src/storage3 tests` passes and `tests/test_client.py` passes (43
tests). I couldn't run the Docker-backed integration tests locally.

@olirice @silentworks could you take a look when you have a moment?

---------

Co-authored-by: Guilherme Souza <guilherme@supabase.io>

11881 of 12509 relevant lines covered (94.98%)

5.83 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
98.52
0.48% src/storage3/_async/file_api.py
1
98.52
-0.01% src/storage3/_sync/file_api.py
Jobs
ID Job ID Ran Files Coverage
1 run-ubuntu-latest-3.13-auth - 40964080161.1 29 Oct 2026 10:13PM UTC 54
93.49
GitHub Action Run
2 run-ubuntu-latest-3.11-functions - 40964080161.2 29 Oct 2026 10:13PM UTC 18
97.32
GitHub Action Run
3 run-ubuntu-latest-3.10-storage - 40964080161.3 29 Oct 2026 10:14PM UTC 38
94.12
GitHub Action Run
4 run-ubuntu-latest-3.12-supabase - 40964080161.4 29 Oct 2026 10:13PM UTC 20
96.67
GitHub Action Run
5 run-ubuntu-latest-3.11-postgrest - 40964080161.5 29 Oct 2026 10:14PM UTC 38
97.1
GitHub Action Run
6 run-ubuntu-latest-3.10-realtime - 40964080161.6 29 Oct 2026 10:14PM UTC 17
88.39
GitHub Action Run
7 run-ubuntu-latest-3.13-functions - 40964080161.7 29 Oct 2026 10:13PM UTC 18
97.32
GitHub Action Run
8 run-ubuntu-latest-3.9-functions - 40964080161.8 29 Oct 2026 10:13PM UTC 18
97.53
GitHub Action Run
9 run-ubuntu-latest-3.12-postgrest - 40964080161.9 29 Oct 2026 10:14PM UTC 38
97.1
GitHub Action Run
10 run-ubuntu-latest-3.14-functions - 40964080161.10 29 Oct 2026 10:13PM UTC 18
97.32
GitHub Action Run
11 run-ubuntu-latest-3.9-realtime - 40964080161.11 29 Oct 2026 10:14PM UTC 17
88.49
GitHub Action Run
12 run-ubuntu-latest-3.9-auth - 40964080161.12 29 Oct 2026 10:13PM UTC 54
93.39
GitHub Action Run
13 run-ubuntu-latest-3.10-supabase - 40964080161.13 29 Oct 2026 10:13PM UTC 20
96.67
GitHub Action Run
14 run-ubuntu-latest-3.11-auth - 40964080161.14 29 Oct 2026 10:13PM UTC 54
93.49
GitHub Action Run
15 run-ubuntu-latest-3.14-realtime - 40964080161.15 29 Oct 2026 10:14PM UTC 17
87.53
GitHub Action Run
16 run-ubuntu-latest-3.11-realtime - 40964080161.16 29 Oct 2026 10:14PM UTC 17
88.39
GitHub Action Run
17 run-ubuntu-latest-3.13-realtime - 40964080161.17 29 Oct 2026 10:14PM UTC 17
88.39
GitHub Action Run
18 run-ubuntu-latest-3.13-storage - 40964080161.18 29 Oct 2026 10:14PM UTC 38
94.12
GitHub Action Run
19 run-ubuntu-latest-3.12-auth - 40964080161.19 29 Oct 2026 10:13PM UTC 54
93.45
GitHub Action Run
20 run-ubuntu-latest-3.14-storage - 40964080161.20 29 Oct 2026 10:14PM UTC 38
94.11
GitHub Action Run
21 run-ubuntu-latest-3.11-storage - 40964080161.21 29 Oct 2026 10:14PM UTC 38
94.12
GitHub Action Run
22 run-ubuntu-latest-3.12-functions - 40964080161.22 29 Oct 2026 10:13PM UTC 18
97.32
GitHub Action Run
23 run-ubuntu-latest-3.9-postgrest - 40964080161.23 29 Oct 2026 10:14PM UTC 38
97.16
GitHub Action Run
24 run-ubuntu-latest-3.12-storage - 40964080161.24 29 Oct 2026 10:14PM UTC 38
94.12
GitHub Action Run
25 run-ubuntu-latest-3.13-postgrest - 40964080161.25 29 Oct 2026 10:14PM UTC 38
97.1
GitHub Action Run
26 run-ubuntu-latest-3.9-supabase - 40964080161.26 29 Oct 2026 10:13PM UTC 20
96.6
GitHub Action Run
27 run-ubuntu-latest-3.14-postgrest - 40964080161.27 29 Oct 2026 10:13PM UTC 38
97.1
GitHub Action Run
28 run-ubuntu-latest-3.10-auth - 40964080161.28 29 Oct 2026 10:13PM UTC 54
93.45
GitHub Action Run
29 run-ubuntu-latest-3.9-storage - 40964080161.29 29 Oct 2026 10:14PM UTC 38
94.2
GitHub Action Run
30 run-ubuntu-latest-3.14-supabase - 40964080161.30 29 Oct 2026 10:13PM UTC 20
96.65
GitHub Action Run
31 run-ubuntu-latest-3.14-auth - 40964080161.31 29 Oct 2026 10:13PM UTC 54
93.47
GitHub Action Run
32 run-ubuntu-latest-3.10-postgrest - 40964080161.32 29 Oct 2026 10:14PM UTC 38
97.1
GitHub Action Run
33 run-ubuntu-latest-3.10-functions - 40964080161.33 29 Oct 2026 10:13PM UTC 18
97.32
GitHub Action Run
34 run-ubuntu-latest-3.12-realtime - 40964080161.34 29 Oct 2026 10:14PM UTC 17
88.39
GitHub Action Run
35 run-ubuntu-latest-3.11-supabase - 40964080161.35 29 Oct 2026 10:13PM UTC 20
96.67
GitHub Action Run
36 run-ubuntu-latest-3.13-supabase - 40964080161.36 29 Oct 2026 10:13PM UTC 20
96.67
GitHub Action Run
Source Files on build 40964080161
  • Tree
  • List 161
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40964080161
  • 980ac9ff on github
  • Prev Build on main (#40946673211)
  • Next Build on main (#41082008698)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc