colyseus / colyseus-unity-sdk

⚔ Colyseus Multiplayer SDK for Unity
https://docs.colyseus.io/getting-started/unity-sdk/
MIT License
371 stars 100 forks source link

Error handing issue when reconnecting with expired session token #227

Open guntarsbeetroot opened 2 months ago

guntarsbeetroot commented 2 months ago

Package: 0.15.9 class: HTTP.cs method: public async Task Request Conditions: using secure protocol only

Problem: In case of expired reconnection token, the error should return : "Reconnection token invalid or expired". But instead, it tries to use unsecure protocol and completely forgets about original error message and returns : " Unexpected end of JSON input".

It would be nice to have this fallback optional or the original error.

Screenshot 2024-05-24 at 15 36 10
endel commented 2 months ago

Hi @guntarsbeetroot, thank you for reporting. This behaviour of switching from secure to insecure protocol must be removed soon. If you can send a PR I really appreciate it, I'll be able to check this out only next month I think.