-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
Describe the bug
When calling supabase.functions.invoke
to a function that responds with non-2xx status code following error is returned with null data:
FunctionsHttpError: Edge Function returned a non-2xx status code
Supabase gives full freedom on how Edge Functions are implemented without enforcing any schema. However, supabase-js
is enforcing some response schema because it discards response body when status is non-2xx.
To Reproduce
- Deploy Edge functions that returns
return new Response("Malformed request", { headers: { status: Status.BadRequest } })
- Call supabase.functions.invoke to it and see that
data
is null.
Expected behavior
data
is available when Edge Functions responds with non-2xx response.
tech-betastreets, KirioXX, apethree, bombillazo, Shaivaan and 11 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working