You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
When returning responses from Edge Functions, Documentation suggests new Response('..', {status: 200}). This works fine as one can see the success message in the data var. When returning a Response with a non-200 status code, the message is not available to the client.
edge func:
return new Response(
JSON.stringify({ success: `all went through smoothly!` }),
{
status: 200, // 200 or 400
},
);
When it is a 200 response, data will display the message but when it is non-200 (eg 400), the error var does not show the message - it only returns a generic message:
FunctionsHttpError: Edge Function returned a non-2xx status code
To Reproduce
Explained above.
Expected behavior
error to contain whatever message is added to the Response object.
System information
OS: macOS
Version of supabase-js: "@supabase/supabase-js": "^2.20.0"
Bug report
Describe the bug
When returning responses from Edge Functions, Documentation suggests
new Response('..', {status: 200}). This works fine as one can see the success message in thedatavar. When returning a Response with a non-200 status code, the message is not available to the client.edge func:
client:
When it is a
200response,datawill display the message but when it is non-200 (eg400), theerrorvar does not show the message - it only returns a generic message:To Reproduce
Explained above.
Expected behavior
errorto contain whatever message is added to theResponseobject.System information
"@supabase/supabase-js": "^2.20.0"v16.17.1