Quantcast
Viewing all articles
Browse latest Browse all 296290

Rest: Error when format is not JSON

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).


Viewing all articles
Browse latest Browse all 296290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>