Skip to content

Commit 5e414ed

Browse files
committed
PWA-1311: New Relic is not being given useful transaction names for graphql requests
- update handling query parse errors
1 parent c665ef2 commit 5e414ed

File tree

1 file changed

+4
-2
lines changed
  • app/code/Magento/GraphQl/Helper/Query/Logger

1 file changed

+4
-2
lines changed

app/code/Magento/GraphQl/Helper/Query/Logger/LogData.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Magento\Framework\App\Response\Http as HttpResponse;
1818
use Magento\Framework\GraphQl\Schema;
1919
use Magento\GraphQl\Model\Query\Logger\LoggerInterface;
20-
use Magento\Ui\Block\Logger;
2120

2221
/**
2322
* Helper class to collect data for logging GraphQl requests
@@ -32,6 +31,7 @@ class LogData
3231
* @param Schema|null $schema
3332
* @param HttpResponse|null $response
3433
* @return array
34+
* @SuppressWarnings(PHPMD.EmptyCatchBlock)
3535
*/
3636
public function getLogData(
3737
RequestInterface $request,
@@ -48,7 +48,9 @@ public function getLogData(
4848
if ($schema) {
4949
$logData = array_merge($logData, $this->gatherQueryInformation($schema));
5050
}
51-
} catch (\Exception $exception) {}
51+
} catch (\Exception $exception) {
52+
// do nothing
53+
}
5254

5355
if ($response) {
5456
$logData = array_merge($logData, $this->gatherResponseInformation($response));

0 commit comments

Comments
 (0)