Reputation: 21
I am trying to follow supabase's documentation at "https://supabase.com/docs/reference/javascript/storage-getbucket" to retrieve bucket details. When I write the following code, I get a 404 error;
const { data, error } = await supabase
.storage
.getBucket('product-images')
console.log(data, error)
Data returns null and error returns 404 bucket is not found. Bucket is public and have permissions. Not sure what else to check?
Upvotes: 1
Views: 436
Reputation: 18690
Make sure the user calling getBucket
has the permission to access the bucket.
https://supabase.com/docs/guides/storage/security/access-control
Upvotes: 1