Hello, I'm running into a 400 error when trying t...
# help
c
Hello, I'm running into a 400 error when trying to empty a storage bucket. Request:
POST
to
https://xxxxxz.supabase.co/storage/v1/bucket/<bucket_name>/empty
Response:
Copy code
json
{
    "statusCode": "400",
    "error": "Bad Request",
    "message": "\"statusCode\" is required!"
}
I'm not sure what the issue is. I just updated the
@supabase/supabase-js
package from
1.31.1
to
1.35.3
to see if that would help. But it didn't 😢 Any idea what's going wrong here?
n
Hello @CandymanDev! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
c
Also this seems to happen on buckets with more objects (~500). It works fine on buckets with ~10 objects. So maybe that has something to do with it, not sure.
n
🆕 400 error statusCode is required when emptying storage bucket
c
Also I get the same error in chrome dev tools when I try to delete the bucket in the supabase dashboard.
g
I'd go ahead and report it here: https://github.com/supabase/storage-api/issues I would expect you would see a 400 error if you don't have delete/select privileges on the object table, but with a message saying that. Also you are not likely to find many people with a bucket with 500 objects they are willing to delete to test this. There is a part of the empty code that has limit(500) in it and appears to loop in batches, but I'd speculate it is not used very much in the real world.
n
400 error statusCode is required when emptying storage bucket
c
Ok thanks for the help! Just wanted to check here first to see if there's anything obvious.
I'll have a closer look at at the empty functionality in that repo and submit an issue.
n
Thread was archived by @CandymanDev. Anyone can send a message to unarchive it.