supabase-js icon indicating copy to clipboard operation
supabase-js copied to clipboard

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

Open 7ttp opened this issue 1 month ago • 2 comments

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

Closes #1408

7ttp avatar Jan 13 '26 07:01 7ttp

Coverage Status

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

coveralls avatar Jan 13 '26 07:01 coveralls

@mandarini

7ttp avatar Jan 13 '26 10:01 7ttp

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

mandarini avatar Jan 22 '26 12:01 mandarini