Skip to content

Commit da8d4ae

Browse files
authored
Fix wrong response type test
1 parent 241c093 commit da8d4ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Plugin/FrontControllerDispatch.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Opengento\WebapiLogger\Plugin;
1010

1111
use Magento\Framework\App\FrontControllerInterface;
12-
use Magento\Framework\Webapi\Response as WebapiResponse;
12+
use Magento\Framework\Webapi\Rest\Response as RestResponse;
1313
use Magento\Framework\App\RequestInterface;
1414
use Magento\Framework\Stdlib\DateTime\DateTime;
1515
use Opengento\WebapiLogger\Model\Config;
@@ -42,7 +42,7 @@ public function beforeDispatch(FrontControllerInterface $subject, RequestInterfa
4242
public function afterDispatch(FrontControllerInterface $subject, $result, RequestInterface $request): mixed
4343
{
4444
if ($this->config->isEnabled() && !$request->isXmlHttpRequest()) {
45-
$exceptions = $result instanceof WebapiResponse ? $result->getException() : '';
45+
$exceptions = $result instanceof RestResponse ? $result->getException() : '';
4646
if ($exceptions !== []) {
4747
$responseCode = '';
4848
$responseBody = '';

0 commit comments

Comments
 (0)