How To create exception for this Bug?

when first Login I got this error It is not a real email. I want to exclude this error
No description
6 Replies
Vp
Vp10mo ago
Share error
Alnuaimi
AlnuaimiOP10mo ago
Symfony\Component\Mailer\Transport\Dsn::__construct(): Argument #2 ($host) must be of type string, null given, called in /var/www/html/vendor/laravel/framework/src/Illuminate/Mail/MailManager.php on line 187
Vp
Vp10mo ago
Can you share flare links?
Alnuaimi
AlnuaimiOP10mo ago
this error action when emailVerification
Vp
Vp10mo ago
Ok, the error says i needs string but i got null, please give me string so that i can go away 😂 For $host With only one line of error it's hard to debug..
Alnuaimi
AlnuaimiOP10mo ago
ok,If I enter with a real email, this error does not appear, but when I enter with the [email protected] email, the error appears I Fixed It set this code inside App\Exceptions\Handler.php public function render($request, Throwable $exception) { if ($exception instanceof \Symfony\Component\Mailer\Exception\TransportExceptionInterface) { // Handle the mail transport exception return response()->json(['error' => 'Mail configuration error. Please check your environment settings.'], 500); } return parent::render($request, $exception); }

Did you find this page helpful?