feat: improved exception handling

This commit is contained in:
Björn Fromme
2025-03-27 09:56:00 +01:00
parent 485d37518f
commit 589787f024
7 changed files with 50 additions and 51 deletions
+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,