From d0979e6581c0a65302833cc48ad0c19b26eb0c9c Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 31 Dec 2019 16:40:21 +0200 Subject: [PATCH] Fixed wrong error message --- app/controllers/auth.php | 6 +++--- app/controllers/teams.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/auth.php b/app/controllers/auth.php index 4b9e4a409d..83afc8e3e5 100644 --- a/app/controllers/auth.php +++ b/app/controllers/auth.php @@ -161,7 +161,7 @@ $utopia->post('/v1/auth/register') // return; // } - // throw new Exception('Problem sending mail: ' . $error->getError(), 500); + // throw new Exception('Problem sending mail: ' . $error->getMessage(), 500); } $webhook @@ -294,7 +294,7 @@ $utopia->post('/v1/auth/register/confirm/resend') try { $mail->send(); } catch (\Exception $error) { - //throw new Exception('Problem sending mail: ' . $error->getError(), 500); + //throw new Exception('Problem sending mail: ' . $error->getMessage(), 500); } $response->json(array('result' => 'success')); @@ -750,7 +750,7 @@ $utopia->post('/v1/auth/recovery') try { $mail->send(); } catch (\Exception $error) { - //throw new Exception('Problem sending mail: ' . $error->getError(), 500); + //throw new Exception('Problem sending mail: ' . $error->getMessage(), 500); } $audit diff --git a/app/controllers/teams.php b/app/controllers/teams.php index 21f6942dea..f2715853f7 100644 --- a/app/controllers/teams.php +++ b/app/controllers/teams.php @@ -378,7 +378,7 @@ $utopia->post('/v1/teams/:teamId/memberships') try { $mail->send(); } catch (\Exception $error) { - //throw new Exception('Problem sending mail: ' . $error->getError(), 500); + //throw new Exception('Problem sending mail: ' . $error->getMessage(), 500); } $audit @@ -457,7 +457,7 @@ $utopia->post('/v1/teams/:teamId/memberships/:inviteId/resend') try { $mail->send(); } catch (\Exception $error) { - //throw new Exception('Problem sending mail: ' . $error->getError(), 500); + //throw new Exception('Problem sending mail: ' . $error->getMessage(), 500); } $audit