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

Command icon 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

longwave created an issue. See original summary.

sijumpk made their first commit to this issue’s fork.

sijumpk’s picture

Status: Active » Needs review

Backtrace removed from the error and checked by generating a 401 error. Please review it.

smustgrave’s picture

Status: Needs review » Needs work

Know it's a task but should this have test coverage?

Abhijith S made their first commit to this issue’s fork.

abhijith s’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

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

  • catch committed 1cc6cc62 on 10.2.x
    Issue #3402173 by sijumpk, Abhijith S, longwave, smustgrave: Remove @...

  • catch committed d3496f63 on 11.x
    Issue #3402173 by sijumpk, Abhijith S, longwave, smustgrave: Remove @...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 10.2.x, thanks!

catch’s picture

Version: 11.x-dev » 10.2.x-dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

donquixote’s picture

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