Describe the bug
We're getting 2 different status code for an exception hence causing conflict which one to use.
To Reproduce
- Upload an entity in Storage bucket
- Make in accessible, could be wrong path name or file name
- Make the download API call
Expected behavior
The status code should be 404 both in StorageException object and in nested message param.
Screenshots
Version (please complete the following information):
On Linux/macOS
Please run dart pub deps | grep -E "supabase|gotrue|postgrest|storage_client|realtime_client|functions_client" in your project directory and paste the output here.
hamza@M1-Max lensfolio_mobile_app % dart pub deps | grep -E "supabase|gotrue|postgrest|storage_client|realtime_client|functions_client"
├── supabase_flutter 2.12.0
│ ├── supabase 2.10.2
│ │ ├── functions_client 2.5.0
│ │ ├── gotrue 2.18.0
│ │ ├── postgrest 2.6.0
│ │ ├── realtime_client 2.7.0
│ │ ├── storage_client 2.4.1
Additional context
The object for me does exists on storage, the policy for storage is to read by any authenticated user yet i'm facing this issue.
- Bucket name: 'resumes'
- File path: 'resumes/uuid.png'
Code snippet:
static Future<File> downloadResume(String filePath) async {
try {
final file = await AppSupabase.supabase.storage
.from(SupaBuckets.resumes)
.download(filePath);
return File.fromRawPath(file);
} catch (e, st) {
if (e is StorageException) {
throw SupaStorageFault.fromStorageException(e, st);
}
throw UnknownFault('Something went wrong!', st);
}
}
Describe the bug
We're getting 2 different status code for an exception hence causing conflict which one to use.
To Reproduce
Expected behavior
The status code should be 404 both in
StorageExceptionobject and in nested message param.Screenshots
Version (please complete the following information):
On Linux/macOS
Please run
dart pub deps | grep -E "supabase|gotrue|postgrest|storage_client|realtime_client|functions_client"in your project directory and paste the output here.Additional context
The object for me does exists on storage, the policy for storage is to read by any authenticated user yet i'm facing this issue.
Code snippet: