F
Filamentβ€’7mo ago
Alnuaimi

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
Vpβ€’7mo ago
Share error
Alnuaimi
AlnuaimiOPβ€’7mo 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
Vpβ€’7mo ago
Can you share flare links?
Alnuaimi
AlnuaimiOPβ€’7mo ago
this error action when emailVerification
Vp
Vpβ€’7mo 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
AlnuaimiOPβ€’7mo 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); }
Want results from more Discord servers?
Add your server