Problem/Motivation
In #3175449: Display backtrace for logged throwables on log message details page we displayed more backtraces where they were available. It was noted that 403/404 errors have their backtrace removed in ExceptionLoggingSubscriber as they are not very useful, but other 4xx errors do not.
Steps to reproduce
Proposed resolution
Remove @backtrace_string in ExceptionLoggingSubscriber::onClientError()
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3402173
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
sijumpk commentedBacktrace removed from the error and checked by generating a 401 error. Please review it.
Comment #5
smustgrave commentedKnow it's a task but should this have test coverage?
Comment #7
abhijith s commentedComment #8
smustgrave commentedLooking at how #3167390: ExceptionLoggingSubscriber should not log backtrace string on access denied exceptions was done this was done the same and does contain simple test coverage that the key is gone.
Comment #11
catchCommitted/pushed to 11.x and cherry-picked to 10.2.x, thanks!
Comment #12
catchComment #14
donquixote commentedWhat was the argument for "not very useful"?
Without a backtrace, I have no idea where and why a request was made.
EDIT: Maybe it is indeed not useful.
If I understand correctly, ReadOnlyModeMethodFilter just listens to any incoming request, so there is nothing additional to learn from the backtrace.