Closed succinct closed 2 years ago
Hi @succinct, I just tested this on a new Symfony 6 app and couldn't get the same error.
What is the stack trace of the UnsupportedMediaTypeHttpException
?
Do you happen to have a request listener that is converting json requests?
@kbond your comment prompted me to dig into the request listeners for json, and it turns out to have been caused by my use of FOSRestBundle, which I use for the website's API layer. I added a new firewall to handle the health checks, and now everything seems to be working fine!
I'm migrating a site from Symfony 3.4 to Symfony 6, and I'm not able to get my health checks to work from the REST api. They do work fine from the console. The POST to
https://localhost/monitor/health/run?group=default
throws the following error:As I mentioned, the checks work as expected when running from the console: