Unexpected server response: 502

You gotta have it send a User-Agent header. If you don’t send that, Glitch will reject the request before it even gets to your app, long before your app can perform the upgrade to websocket. Coincidentally, if a request to upgrade to websocket is not successfully upgraded, another part of Glitch or AWS or something breaks and you get a 502 back, which annoyingly swallows any other error information.

3 Likes