Unable to customize trigger function exception error #28129
Unanswered
saqibameen
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Describe the problem
I create
signedUploadUrland then allow user to upload files. Post upload, I use trigger function to do some validations are operations. If something goes wrong, I raise an exception something like this:It gives error something like this:
{ statusCode: '500', code: 'DatabaseError', error: 'DatabaseError', message: 'insert into "objects" ("bucket_id", "metadata", "name", "owner", "owner_id", "version") values ($1, $2, $3, DEFAULT, DEFAULT, $4) on conflict ("name", "bucket_id") do update set "metadata" = $5,"version" = $6 returning * - 'Something went wrong.' }To Reproduce
Expected behavior
This error is user facing. Allow customization of this error so that I can send a better error message.
System information
All reactions