Skip to content

Conversation

@7ttp
Copy link
Contributor

@7ttp 7ttp commented Jan 13, 2026

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

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
Copy link
Contributor Author

7ttp commented Jan 13, 2026

@mandarini
Copy link
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

3 participants