Open naomiven opened 1 year ago
in WebsocketAPI can we have a method that closes a websocket connection with a specified code?
WebsocketAPI
similar to this
according to the websocket protocol we should be able to do this -> spec
right now, in API gateway logs, the connection is always closed with status code 1000 when calling the existing close method:
close
app.websocket_api.close(event.connection_id)
API gateway logs:
Endpoint request body after transformations: ... { "routeKey": "$disconnect", "disconnectStatusCode": 1000, "authorizer": { "principalId": "user" }, "eventType": "DISCONNECT", "requestTime": "20/Jul/2023:23:29:25 +0000", "messageDirection": "IN", "disconnectReason": "Connection Closed Normally", "connectedAt": 1689895754759, "requestTimeEpoch": 1689895765983, ...
in
WebsocketAPI
can we have a method that closes a websocket connection with a specified code?similar to this
according to the websocket protocol we should be able to do this -> spec
right now, in API gateway logs, the connection is always closed with status code 1000 when calling the existing
close
method:API gateway logs: