Skip to content
This repository was archived by the owner on May 17, 2025. It is now read-only.

Ignore gone exceptions #197

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/utils/postToConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,8 @@ export const postToConnection = (server: ServerClosure) =>
Data: JSON.stringify(message),
})
.promise()
.catch(err => {
if (err?.code !== 'GoneException') throw err
console.warn('Connection already closed at API Gateway, ignoring')
})
}