-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Non-200 status Responses do not expose message #55
Comments
This simple, if the response functions-js/src/FunctionsClient.ts Lines 97 to 99 in af4113a
This error is gobbling up the error thrown and returns a generic message: Lines 38 to 42 in af4113a
These custom function error classes are opinionated and override the expected error response of the edge function logic. However, the error returned has a functions-js/src/FunctionsClient.ts Lines 80 to 99 in af4113a
|
+1 |
1 similar comment
+1 |
If anyone comes here and just want to show the error, this was my solution:
|
this was driving me crazy .. thank you @bettysteger for the fix. Can't believe this hasn't been patched.. |
@herringtown I've been using Supabase for more than 1 year, and they've been very absent and indifferent to their OS libraries. I've even contributed PRs to fix stuff and have waited for review for months. They seem more focused on patching only when it's supercritical or minimal effort. It's a frustrating state of affairs for such a product |
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 thedata
var. 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
200
response,data
will display the message but when it is non-200 (eg400
), theerror
var does not show the message - it only returns a generic message:To Reproduce
Explained above.
Expected behavior
error
to contain whatever message is added to theResponse
object.System information
"@supabase/supabase-js": "^2.20.0"
v16.17.1
The text was updated successfully, but these errors were encountered: