exception_to_status and monolog's excluded_http_codes
It seems like exception_to_status and monolog's excluded_http_codes in the fingers crossed handler don't work together.
We have mapped a ItemNotFound exception to 404 in exception_to_status, and we have excluded 404's from monolog via fingers crossed / excluded_http_codes. But the exception is still processed in monolog.
Anything I can do to prevent this? Or do I have to catch the exception and throw a HttpException? Which would render exception_to_status useless...
There is maybe a problem with listener priorities? Monolog is likely executing before the API Platform listener.
Not sure why, check here: https://github.com/api-platform/core/blob/main/src/Symfony/EventListener/ErrorListener.php#L87 can you open an issue on api-platform/core with a bit more details, we don't touch the monolog configuration.