diff --git a/lib/utils/postToConnection.ts b/lib/utils/postToConnection.ts index 5ff35389..6c775107 100644 --- a/lib/utils/postToConnection.ts +++ b/lib/utils/postToConnection.ts @@ -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') + }) }