feat: improved error handling and feedback

This commit is contained in:
Björn Fromme committed 2025-03-24 19:41:51 +01:00
1 parent 7bcda3e6f8
commit 296464701d
7 files changed
+64 -24

No files matched your search

+2 -1
View File
@@ -4,6 +4,7 @@ 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;
@@ -42,7 +43,7 @@ class RegistrationController extends AbstractController
$this->logger->info('Initiated registration', [
'email' => $registrationData->email,
]);
} catch (ApiClientException $e) {
} catch (ApiClientException|ResponseParserException $e) {
$this->addFlash('error', $e->getMessage());
$this->logger->error('Error initiating registration', [
'email' => $registrationData->email,