Skip to content

fix(storage): expose status and statusCode on StorageError base class#2018

Merged
mandarini merged 1 commit into
supabase:masterfrom
7ttp:fix/storage-error-statuscode-type
Jan 22, 2026
Merged

fix(storage): expose status and statusCode on StorageError base class#2018
mandarini merged 1 commit into
supabase:masterfrom
7ttp:fix/storage-error-statuscode-type

Conversation

@7ttp

@7ttp 7ttp commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Exposes status and statusCode properties on the base StorageError class for TypeScript compatibility.

Problem

Storage operations return errors typed as StorageError, but status and statusCode properties only exist on the StorageApiError subclass.
This causes TypeScript errors when users try to access these properties without casting.

Solution

Add optional status?: number and statusCode?: string to the base StorageError class. Backwards compatible - no breaking changes.

Related

@7ttp 7ttp requested review from a team as code owners January 13, 2026 07:38
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 81.001% (+0.004%) from 80.997%
when pulling b7fec22 on 7ttp:fix/storage-error-statuscode-type
into 09aa106 on supabase:master.

@7ttp

7ttp commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

@mandarini

@mandarini

Copy link
Copy Markdown
Contributor

@7ttp can you please rebase your PR with latest master to fix the failing pipeline?

@7ttp 7ttp force-pushed the fix/storage-error-statuscode-type branch from b7fec22 to d1a3111 Compare January 22, 2026 12:55
@mandarini mandarini merged commit 5ed0ce9 into supabase:master Jan 22, 2026
24 checks passed
@7ttp 7ttp deleted the fix/storage-error-statuscode-type branch January 25, 2026 13:06
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.

Storage Upload Error Typescript Issue

3 participants