client-sdk-unity icon indicating copy to clipboard operation
client-sdk-unity copied to clipboard

Silent Errors during Room Join failures

Open thedrhax14 opened this issue 5 months ago • 1 comments

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.

thedrhax14 avatar Sep 01 '25 12:09 thedrhax14

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).

ladvoc avatar Sep 02 '25 06:09 ladvoc