diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 64226415..738d1ad9 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -188,7 +188,10 @@ class AuthController extends Controller Mail::to($request->input('email'))->send(new ForgotPassword($user->uid, $token)); Log::info("[Password Reset] Mail has been sent to [{$request->input('email')}] with token [$token]"); - } catch(\Exception $e) { + } catch (\Exception $e) { + // Write the exception to log + app(\Illuminate\Foundation\Exceptions\Handler::class)->report($e); + return json(trans('auth.mail.failed', ['msg' => $e->getMessage()]), 2); }