When the JWT token used to establish a WebSocket connection expires, Hasura sends this WebSocket message:
{
"type":"connection_error",
"payload":"Could not verify JWT: JWTExpired"
}
As far as I can tell this is not spec-compliant. The main practical issue is that the graphql-ws library doesn't recognize the message and throws a different error, effectively swallowing the original message payload.
What is the expected behaviour?
Hasura should return a spec-compliant error message.
Version Information
Server Version: 2.29.0
Environment
OSS
What is the current behaviour?
When the JWT token used to establish a WebSocket connection expires, Hasura sends this WebSocket message:
As far as I can tell this is not spec-compliant. The main practical issue is that the
graphql-ws
library doesn't recognize the message and throws a different error, effectively swallowing the original message payload.What is the expected behaviour?
Hasura should return a spec-compliant error message.
How to reproduce the issue?
Keywords
graphql-ws websocket jwtexpired