Silent Errors during Room Join failures
Hello everyone,
Recently we noticed that unity clients when connecting to openvidu/livekit server it can fail to join a room without providing further details. However, on the server side in logs we found that server actually communicates the exact error. For example one of them is 401 but the only way to find it is to open the logs on grafana and look for exact message which looks like this:
2025-09-01T12:07:49.701Z WARN livekit service/auth.go:89 error handling request {"status": 401, "method": "GET", "path": "/rtc", "error": "invalid API key: ..."}
I believe it is better to communicate this kind of error on client side as well. At the moment it just says "Failed to join a room". Not sure where is it best to put a code for this. It will greatly benefit the developer experience and make troubleshooting easier.
Regards.
Hi @thedrhax14, thank you for reporting this. I agree—the connection failure reason should be exposed. Looking at the code, it looks like the error string included in the connect callback is not exposed in the public API yet (Room.cs:580).