Skip to content

Commit c3c8bca

Browse files
committed
Catch correct exception
1 parent 2e821f6 commit c3c8bca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ConnectionRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public function sendMessage(string $connectionId, string $data): void
2727
'Data' => $data,
2828
]);
2929
} catch (ApiGatewayManagementApiException $e) {
30-
// handle gone connections
31-
if ($e->getAwsErrorCode() === 'GoneException') {
30+
// GoneException: The connection with the provided id no longer exists.
31+
if ($e->getAwsErrorCode() === 'Gone') {
3232
$this->subscriptionRepository->clearConnection($connectionId);
3333

3434
return;

0 commit comments

Comments
 (0)