I have Drupal 8.6.13 with modules "RESTful Web Services" and "Serialization" enabled.
When i open a link with a wrong format (not JSON), website logs a crash:
example "abc": https://www.test.be/node/1?_format=abc
The website encountered an unexpected error. Please try again later.
Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException: Not acceptable format: abc in Drupal\Core\EventSubscriber\RenderArrayNonHtmlSubscriber->onRespond() (line 30 of /data/sites/web/jan/www/quiz/core/lib/Drupal/Core/EventSubscriber/RenderArrayNonHtmlSubscriber.php).
Comments
Comment #2
krzysztof domańskiDuplicate of #3035589: Website exception via GET with QUERY_STRING "?_format=...".
Comment #3
dydave commentedFor those coming to this ticket with a Cloud Flare setup enabled, with this issue occurring on batch pages, see also :
#2879023: Batch is dependent on the order of query string parameters
and :
https://drupal.stackexchange.com/questions/271745/batch-api-error-respon...
https://acquia.my.site.com/s/article/360022037774-Resolving-Not-acceptab...