Commit 1cc6cc62 authored by catch's avatar catch
Browse files

Issue #3402173 by sijumpk, Abhijith S, longwave, smustgrave: Remove...

Issue #3402173 by sijumpk, Abhijith S, longwave, smustgrave: Remove @backtrace_string in ExceptionLoggingSubscriber::onClientError()

(cherry picked from commit d3496f63)
parent f7e93f2a
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ public function onClientError(ExceptionEvent $event) {
    $error += [
      'status_code' => $exception->getStatusCode(),
    ];
    unset($error['@backtrace_string']);
    $this->logger->get('client error')
      ->warning(Error::DEFAULT_ERROR_MESSAGE, $error);
  }
+5 −0
Original line number Diff line number Diff line
@@ -79,6 +79,11 @@ public function testExceptionLogging() {
    foreach ($expected_channels as $key => $expected_channel) {
      $this->assertEquals($expected_channel, $logs[$key][2]['channel']);
      $this->assertEquals($expected_levels[$key], $logs[$key][0]);

      // Verify that @backtrace_string is removed from client error.
      if ($logs[$key][2]['channel'] === 'client error') {
        $this->assertArrayNotHasKey('@backtrace_string', $logs[$key][2]);
      }
    }
  }