edge-runtime icon indicating copy to clipboard operation
edge-runtime copied to clipboard

Requests to edge function fails on the server but works locally, please help

Open drobles-atdev opened this issue 9 months ago • 1 comments

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [ ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I created a new edge function in my application, works fine when testing it locally, but keeps throwing the same unhandled exception "Request failed due to a server error".

I confirmed that the issue is not the edge function itself but the server its running from.

To Reproduce

just create a new edge function like so:

Deno.serve(async (req) => { return new Response(JSON.stringify({ message:edge function test ${Math.random()} }), { headers: { 'Content-Type': 'application/json' }, status: 200, }) })

Expected behavior

it should return the json { message : "edge function test {some number}" }

Screenshots

image

image

System information

  • OS: manjaro
  • Browser (if applies): postman
  • Version of supabase-js: n/a
  • Version of Node.js: n/a

drobles-atdev avatar May 15 '24 20:05 drobles-atdev

@drobles-atdev Do you still experience this issue? I believe you opened a support ticket on this, to which I have responded.

laktek avatar May 16 '24 01:05 laktek

Closing due to inactivity.

laktek avatar Jun 19 '24 06:06 laktek