feat: distinguish error and info feedbacks

This commit is contained in:
Björn Fromme
2025-03-24 16:30:21 +01:00
parent 1498bdb53b
commit c8d8c62ff8
3 changed files with 13 additions and 14 deletions
+7 -3
View File
@@ -94,9 +94,13 @@ class EditController extends AbstractController
'email' => $bpnUser->getEmail(),
'booking_id' => $id,
]);
if ($response instanceof Notification && false === $response->isSuccessful()) {
$this->addFlash('error', $response->message);
$this->logger->error('Error initiating booking update', [
if ($response instanceof Notification) {
if (true === $response->isError()) {
$this->addFlash('error', $response->message);
} else {
$this->addFlash('info', $response->message);
}
$this->logger->error('Booking update not successful', [
'email' => $bpnUser->getEmail(),
'booking_id' => $id,
'message' => $response->message,