-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DB errors are not sent forward #373
Comments
Hi, @soudis this is somewhat international since we don't want to accidentally leak information returned from the error message from the database. However, a good thing we can add is to return the link which points to a log line for you to inspect the error in more details, what do you think? |
Update@fenos the issue in Supabase Auth was closed and they said it was planned to have similar functionality through Auth hooks where you can handle errors (reference). Maybe something similar like Storage hooks at some point in future? 🤷
@fenos this concern was mentioned in supabase/auth as well, but it was decide at the time that the error message can be sent under specific conditions. ~ Refer this comment However, this no longer works for some reason. I'm unsure if there was a reason this was removed or it it's a bug, but I've opened an issue reporting it as a bug. I'd really like if this was possible with Supabase Auth, I don't have a requirement for this feature in Supabase Storage (at least not for now), but I mentioned this because I thought the behaviour (whatever has been decided) should be consistent. |
Hi @fenos, This is a function that I'm using in storage RLS for selecting a file:
In my app, after trying to upload a file with the RLS not meeting the criteria:
...I'm getting the following:
|
me too |
Bug report
Describe the bug
I'm using a database trigger on the storage.objects table to sum up file sizes per bucket into a different table. When the quota is exceeded the database trigger raises an exception to not allow the upload:
I assumed the message of the exception would be passed on by the storage api but instead i receive:
The message from the database seems to be swallowed here for no apparent reason:
https://github.com/supabase/storage-api/blob/27c3b388a45be1fafdc51706be9c60349a9f5255/src/storage/database/knex.ts#L526-L556
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
If the SQL exception contains details, they whould be passed on like:
Could work similiar to here: supabase/auth#404
System information
Additional context
The text was updated successfully, but these errors were encountered: