nextjs-subscription-payments icon indicating copy to clipboard operation
nextjs-subscription-payments copied to clipboard

Address the 406 error caused by getUserDetails in the /utils/useUser.tsx file

Open brentrobbins opened this issue 3 years ago • 1 comments

Recently I noticed the following when you are logged in and do not have a subscription connected to your account. This is happening on my site and I also noticed it on the dev site. I am pretty sure it's being triggered by the /utils/useUser.tsx file by the getUserDetails function.

Screen Shot 2022-03-15 at 1 58 55 PM Screen Shot 2022-03-15 at 1 58 46 PM

brentrobbins avatar Mar 15 '22 20:03 brentrobbins

Hey @brentrobbins , this one is expected as it uses the single() method: https://supabase.com/docs/reference/javascript/single

This could probably be updated to use https://supabase.com/docs/reference/javascript/maybesingle. Wanna open a PR?

thorwebdev avatar Mar 17 '22 13:03 thorwebdev