Hey all! I'm building a relatively simple edge fun...
# help
o
Hey all! I'm building a relatively simple edge function that literally just takes a request body, validates it, and saves it in the db. and for some reason I can't figure out why but I keep getting a 502 response from this endpoint. Here's a codepen with the code for my edge function: https://codesandbox.io/s/strange-wilson-ylnfpp?file=/src/functions/create-event/index.ts I copied and pasted the example found here: https://github.com/supabase/supabase/blob/master/examples/edge-functions/supabase/functions/select-from-table-with-auth-rls/index.ts and that function is working fine. But for some reason my function is returning the following error:
Copy code
502: Bad Gateway (ORIGIN_BOOT_RPC_ERROR)

The subhoster origin returned a failure status for the boot RPC call. Status: 500 Internal Server Error
any help would be appreciated 🙂
n
Hello @oystermaker! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! 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.
o
@User
n
🆕 502-edge-function
g
No idea on what the error means, but how are you calling the edge function? If from a browser then you need all the cors stuff like in the example.
n
502-edge-function
o
I'm calling it from postman, so i don't believe it's a CORS issue
g
Yeah, then sorry I got nothing for you. I dealt with cors issue getting my function working and it worked fine doing an email api call. I googled your error and found nothing obvious to help.
o
yeah, i started on google, found nothing.. lol
g
You might post on github if you are out of ideas as devs are more there.
o
it's weird to me that the example function works fine. yeah i think i'll post a GH issue.
thanks anyway @garyaustin 🙂
g
Yeah they work, but just not enough info yet when they don't...
o
here's a link to the issue incase anyone else is experiencing this: https://github.com/supabase/supabase/issues/6647