Problem/Motivation
Similar to #3114122: ExceptionLoggingSubscriber should log 403 access denied reason, we could log more information for 404 pages. Just had an issue where a request failed due to parameter conversion. It was pretty hard to debug why the page returned a 404.
Steps to reproduce
Visit a page that doesn't exist or fails parameter conversion. With layout builder for example, you can visit a layout configuration page for a non-existing node to easily trigger the issue: /layout_builder/configure/section/overrides/node.9/0/layout_heading
Proposed resolution
Add more 404 exception context to the log message in ExceptionLoggingSubscriber. That way an admin/developer quickly sees why a 404 was returned.
Remaining tasks
- Review patch
- Write tests
- Final reviews + RTBC
- Commit
User interface changes
The log message at /admin/reports/dblog will have a better message.
Before
/layout_builder/configure/section/overrides/node.9/0/layout_heading?_wrapper_format=drupal_dialog.off_canvas
After
/layout_builder/configure/section/overrides/node.9/0/layout_heading?_wrapper_format=drupal_dialog.off_canvas
API changes
None
Data model changes
None
Release notes snippet
TBD