This PR edits the handling of errors related to websocket connections and disconnections. In particular, clients and users would often run into the dreaded Connection Error: Success message which was confusing and frustrating. This PR better addresses the error by providing more guidance and debug info for the user. It is unfortunately still suboptimal because the HttpStatusCode is not available in the .NET core version that Unity supports. We try to be as helpful as possible in this scenario.
Description of Changes
This PR edits the handling of errors related to websocket connections and disconnections. In particular, clients and users would often run into the dreaded
Connection Error: Success
message which was confusing and frustrating. This PR better addresses the error by providing more guidance and debug info for the user. It is unfortunately still suboptimal because theHttpStatusCode
is not available in the .NET core version that Unity supports. We try to be as helpful as possible in this scenario.API
OnDisconnect
andOnConnectError
callbacks to implement the API specification: https://github.com/clockworklabs/SpacetimeDBPrivate/pull/866/files#diff-be533cc04817c33605a68d717c6ec320c4449904266ee8e1096971e9e17e8d31R424Requires SpacetimeDB PRs
No changes to SpacetimeDB required.
Testing
I, Tyler, have tested this and confirmed it to be working with CircleGame. Here is a sample of the output in the case of
Connection Error: Success
: