When I run this locally using netlify dev, I see the “Hello world” output.
On the live site though, I get an HTTP 200 but an empty body.
I can see from the Function log that the code is indeed executing, but something appears to be truncating the body.
(Side note, when I initially tried to post this, my post failed to appear - probably some spam filter? The topic disappeared and I saw the errors below in the browser console. I could only get this post to appear once I removed the URL)
I’m not sure why stringifying the body content would make a difference? The Netlify documentation for functions has them returning ordinary strings as output for the body, and I have that working fine in other repos.
Anyway, I gave it a go, and I’m still seeing the same thing. Blank output when served from https://remembermore-dashboard.netlify.app/.netlify/functions/submit, but it works fine when I serve it locally using netlify dev.