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?
Make sure the user calling
getBucket
has the permission to access the bucket.https://supabase.com/docs/guides/storage/security/access-control