Open cloutiertyler opened 3 months ago
The error response message from SpacetimeDB needs to differentiate between connecting to a module that doesn't exist and a bad token. We do not currently do this. This is an API break.
We just need to update this so that clients receive an error message that their token is invalid.
It's worth saying that we're planning to rework identities & tokens pretty soon - maybe we should revisit this after that refactoring happens?
I'll just note, that in a meeting with @jdetter we decided that the identities and tokens rework is not going to make this issue go away although hopefully it will make it less frequent.
Empirical analysis shows this to be the SDK's problem, not the host's. The host sends a reasonable HTTP error response with a well-chosen status code and a human-readable description in the body in response to /database/subscribe
calls with invalid tokens, and the Rust SDK is able to print these. (Currently it prints the status code but not the body, but it clearly receives the intended response.) Somewhere in the C# SDK, whether it's our code or the WebSocket library we use, the client is discarding that HTTP error response and printing something stupid and useless instead.
We have determined that this is an issue in the C# SDK or C# websocket client specifically. It is correct in the API. Thus I'm moving this to 1.0.
zeke investigation results so far
WebSocketException
, which is not a type we construct (in the SDK)Success