From e81094890b4c225963a55bea5721638f36c823ea Mon Sep 17 00:00:00 2001 From: Uladzimir Tsykun Date: Tue, 26 Sep 2023 22:36:29 +0200 Subject: [PATCH] Fix handle integration errors --- src/Controller/Api/ApiController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controller/Api/ApiController.php b/src/Controller/Api/ApiController.php index b0905c04..fcc3b25e 100644 --- a/src/Controller/Api/ApiController.php +++ b/src/Controller/Api/ApiController.php @@ -325,13 +325,13 @@ protected function receiveIntegrationHook(Request $request, OAuthIntegration $oa } $job = AppUtils::createLogJob($request, $oauth); - $response = $app = null; + $response = null; try { - $app = $this->integrations->findApp($oauth->getAlias()); - $response = $app->receiveHooks($oauth, $request, $this->getJsonPayload($request)); + $client = $this->integrations->findApp($oauth->getAlias()); + $response = $client->receiveHooks($oauth, $request, $this->getJsonPayload($request)); $job->setStatus(Job::STATUS_COMPLETED); } catch (\Throwable $e) { - $error = AppUtils::castError($e, $app, true); + $error = AppUtils::castError($e, $oauth, true); $this->logger->error($error, ['e' => $e]); $job->setStatus(Job::STATUS_ERRORED);