From 11b9809f79f8285e3acd91251c1f7f3973bf788a Mon Sep 17 00:00:00 2001 From: Marcus Date: Thu, 12 Dec 2024 05:17:40 +0100 Subject: [PATCH] do not log StateException as critical error and show the real error message to the user --- app/code/Magento/Customer/Controller/Account/Confirm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Controller/Account/Confirm.php b/app/code/Magento/Customer/Controller/Account/Confirm.php index d215a935545eb..a2c691c35a55c 100644 --- a/app/code/Magento/Customer/Controller/Account/Confirm.php +++ b/app/code/Magento/Customer/Controller/Account/Confirm.php @@ -191,7 +191,7 @@ public function execute() $resultRedirect->setUrl($this->getSuccessRedirect()); return $resultRedirect; } catch (StateException $e) { - $this->messageManager->addException($e, __('This confirmation key is invalid or has expired.')); + $this->messageManager->addErrorMessage($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addException($e, __('There was an error confirming the account')); }