Getting an 204 status code without content using supabase.functions.invoke cause error

When we invoke an supabase function and getting an 204 return with no content then the function crash. While i'm expacting that when resolved to an 204 (no-content see https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/204) it doesn't try to parse the json. Is this an bug or do we need to send something extra with the invoke method to make sure we don't parse the response by default?

Our code looks like this:

await supabase.functions.invoke(
"item_delete",
{
method: "DELETE",
body: { id: itemId }
}
);
Was this page helpful?