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
Postgrest giving stacktrace of only postgrest code #899
Comments
This is fair. Will look into it. |
Any update on this? I will need to find a workaround if not which will probably involve rethrowing a custom error in every place that I use superbase database functions which will be annoying (simply logging isn't enough since like many people, I am using sentry to record errors). Or if you have any ideas about the cause I can try to fix and open a PR |
I've spent hours looking at the
This added some lines from my app to the postgrest stacktrace which is very useful, but annoying to do at every database related call I make. I dont have a lot of dart experience but it seems that the problem is due to the The I feel like there must be another way to do this inside supabase/postgrest code which then doesn't require changing my app code but I don't know enough about dart to figure it out. |
Actually, maybe the following method can be added to
Then in the app code, the developer just needs to append
The stack trace of the same error as I gave in my first post is now:
@dshukertjr, what are your thoughts? |
My solution is to create the following file in my own code and import that into files where I do supabase db operations and then append
|
Adding I took a quick stab at this issue, but couldn't come up with a solution that includes the desired stack trace. Although it's not ideal, this issue does have a workaround and is not a critical issue, the priority will be lower than some other issues that we have. With that being said, I will try to see if I can do something about it time to time. |
Describe the bug
Whenever I use database function on the supabase client (
supabase.rpc
orsupabase.from
) and these throw an error then the stack trace is limited to postgrest code only and non of my app lines (other supabase functions do give a full stacktrace like callingsupabase.signInWithPassword
with an invalid email so I don't think it's my logging setup.For example:
To Reproduce
Call a supabase function which will give an error like
await supabase.rpc('invalid_function')
Expected behavior
The stacktrace should should lines in my app code which led up to the error.
The text was updated successfully, but these errors were encountered: