更高界别处理异常:
$client = new Client(); $shareUrl = 'https://api.linkedin.com/v2/socialActions/6799906381634912256'; try { $response = $client->request('GET', $shareUrl); $code = $response->getStatusCode(); } catch (\Throwable $throwable) { dump($throwable); return false; }