fix: handle bpn notification response on personal data update
This commit is contained in:
@@ -91,7 +91,18 @@ class PersonalDataController extends AbstractController
|
|||||||
|
|
||||||
if ($personalDataForm->isSubmitted() && $personalDataForm->isValid()) {
|
if ($personalDataForm->isSubmitted() && $personalDataForm->isValid()) {
|
||||||
try {
|
try {
|
||||||
$this->apiClient->updatePersonalData($email, $password, $personalData);
|
$updateResult = $this->apiClient->updatePersonalData($email, $password, $personalData);
|
||||||
|
|
||||||
|
if ($updateResult instanceof Notification) {
|
||||||
|
$this->logger->error('Personal data update rejected by BusProNet', [
|
||||||
|
'email' => $user->getEmail(),
|
||||||
|
'code' => $updateResult->code,
|
||||||
|
'error' => $updateResult->message,
|
||||||
|
]);
|
||||||
|
$this->addFlash('error', 'Deine persönlichen Daten konnten nicht aktualisiert werden. Bitte versuche es erneut.');
|
||||||
|
|
||||||
|
return $this->redirectToRoute('app_personal_data');
|
||||||
|
}
|
||||||
|
|
||||||
// Invalidate cached bookings to ensure edit mode shows updated applicant data
|
// Invalidate cached bookings to ensure edit mode shows updated applicant data
|
||||||
$this->dataLoader->invalidateUserBookingCaches($user);
|
$this->dataLoader->invalidateUserBookingCaches($user);
|
||||||
|
|||||||
Reference in New Issue
Block a user