Skip to content

Commit 2bb12c4

Browse files
Merge branch 'application-server' of github.com:magento-performance/magento2ce into ACPT-1634
2 parents 79294cf + dcf0e0b commit 2bb12c4

File tree

8 files changed

+2299
-746
lines changed

8 files changed

+2299
-746
lines changed

app/code/Magento/ApplicationPerformanceMonitor/Plugin/ApplicationPerformanceMonitor.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
use Magento\ApplicationPerformanceMonitor\Profiler\Profiler;
1111
use Magento\Framework\AppInterface as Application;
12-
use Magento\Framework\App\HttpRequestInterface;
13-
use Magento\Framework\App\Response\HttpInterface;
1412
use Magento\Framework\App\ResponseInterface;
1513

1614
/**
@@ -30,7 +28,7 @@ public function __construct(private Profiler $profiler)
3028
*
3129
* @param Application $subject
3230
* @param callable $proceed
33-
* @return HttpInterface
31+
* @return ResponseInterface
3432
*/
3533
public function aroundLaunch(
3634
Application $subject,

app/code/Magento/GraphQlNewRelic/Plugin/ReportError.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ public function __construct(private NewRelicWrapper $newRelicWrapper)
3535
public function beforeHandle(ErrorHandler $subject, array $errors, callable $formatter)
3636
{
3737
if (!empty($errors)) {
38-
$this->newRelicWrapper->reportError($errors[0]); // Note: We only log the first error because performance
38+
$error = $errors[0];
39+
if (($error instanceof Error ) && $error->getPrevious()) {
40+
$error = $error->getPrevious();
41+
}
42+
$this->newRelicWrapper->reportError($error); // Note: We only log the first error because performance
3943
}
4044
return null;
4145
}

0 commit comments

Comments
 (0)