Discussed in #11248
Originally posted by alexbjorlig December 9, 2023
If you POST JSON to a form action, sveltekit will throw Actions expect form-encoded data (received application/json).
This will then bubble to HandleServerError, and result in an Error with HTTP status code 500.
I think it would be better if the error was either 415 or 400.
One of the issues with the current implementation is that if you report to Sentry in the error handler, you will report an error when people submit wrong data (something that will create a lot of noise in Sentry). Better to reserve HTTP 500 for situations where we don't have better.
I might be missing something. If not, then I would be happy to submit a PR.