Level 1
Hi @MvdP,
I had the same issue, your code looks right. You may need to add a backward slash to Guzzle
try {
$user = Socialite::driver('facebook')->user();
} catch (\GuzzleHttp\Exception\ClientException $e) {
dd('Here');
}
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi all,
Would anyone have an idea how to catch a Socialite / Guzzle 400 ClientException? My code currently looks like this, but it the catch part does not seem to take effect:
try {
$user = Socialite::driver('facebook')->user();
} catch (GuzzleHttp\Exception\ClientException $e) {
dd('Here');
}
dd( $user );
I am just stuck in the normal error screen reporting the error to me.
Thanks in advance for any guidance.
Please or to participate in this conversation.