feat: improved exception handling

This commit is contained in:
Björn Fromme committed 2025-03-27 09:56:00 +01:00
1 parent 485d37518f
commit 589787f024
7 files changed
+50 -51

No files matched your search

+1 -2
View File
@@ -4,7 +4,6 @@ namespace App\Controller;
use App\BusProNet\ApiClient;
use App\BusProNet\Exception\ApiClientException;
use App\BusProNet\Exception\ResponseParserException;
use App\Form\Model\RegistrationData;
use App\Form\RegistrationType;
use Psr\Log\LoggerInterface;
@@ -43,7 +42,7 @@ class RegistrationController extends AbstractController
$this->logger->info('Initiated registration', [
'email' => $registrationData->email,
]);
} catch (ApiClientException|ResponseParserException $e) {
} catch (ApiClientException $e) {
$this->addFlash('error', $e->getMessage());
$this->logger->error('Error initiating registration', [
'email' => $registrationData->email,