Skip to content
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

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

Open
1 of 2 tasks
drobles-atdev opened this issue May 15, 2024 · 1 comment
Open
1 of 2 tasks
Labels
bug Something isn't working

Comments

@drobles-atdev
Copy link

drobles-atdev commented May 15, 2024

Bug report

  • 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 drobles-atdev added the bug Something isn't working label May 15, 2024
@drobles-atdev drobles-atdev changed the title Requests to edge function fails on the server but works locally Requests to edge function fails on the server but works locally, please help May 15, 2024
@laktek
Copy link
Contributor

laktek commented May 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants