Netlify function returns 500 only in production and no logs

Yes, the logs are empty even if I try logging something right at the top of the handler function.
I’ve since came across this - Unable to run a function alongside a generated Nuxt app - #12 by hrishikesh, and the workaround of removing the /* /404.html 404 from _redirects did make the functions work.