Closed lovasoa closed 1 year ago
Screenshot
Connecting to a hasura graphql server with a jwt that does not contain the x-hasura-default-role claim.
x-hasura-default-role
Expected Behaviour The error returned by hasura is properly forwarded to the user.
Hasura returns {"type":"connection_error","payload":"JWT claim does not contain x-hasura-default-role"}
{"type":"connection_error","payload":"JWT claim does not contain x-hasura-default-role"}
The error message returned by the library should contain the string JWT claim does not contain x-hasura-default-role
JWT claim does not contain x-hasura-default-role
Actual Behaviour but instead the library threw the following error :
Error: Invalid message 'type' property "connection_error" validateMessage common.mjs:142 parseMessage common.mjs:168 onmessage client.mjs:214 connecting client.mjs:212 connecting client.mjs:256
Screenshot
Reproduction
Connecting to a hasura graphql server with a jwt that does not contain the
x-hasura-default-role
claim.Expected Behaviour The error returned by hasura is properly forwarded to the user.
Hasura returns
{"type":"connection_error","payload":"JWT claim does not contain x-hasura-default-role"}
The error message returned by the library should contain the string
JWT claim does not contain x-hasura-default-role
Actual Behaviour but instead the library threw the following error :