Skip to content

Commit f01a99d

Browse files
authored
Revert catch
1 parent 612cb4a commit f01a99d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ConnectionRepository.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public function sendMessage(string $connectionId, string $data): void
2727
'ConnectionId' => $connectionId,
2828
'Data' => $data,
2929
]);
30-
} catch (ClientException $guzzleClientException) {
31-
// GoneException: The connection with the provided id no longer exists.
32-
if ($guzzleClientException->getResponse()->getStatusCode() === 410) {
30+
} catch (ApiGatewayManagementApiException $e) {
31+
// GoneException: The connection with the provided id no longer exists.
32+
if ($e->getAwsErrorCode() === 'GoneException') {
3333
$this->subscriptionRepository->clearConnection($connectionId);
3434

3535
return;

0 commit comments

Comments
 (0)