Catch errors from NetworkManager UNET

I’m trying to set-up a game using the new unet networking API. Now a got everything to work and the servers and clients work as expected. But now when, for example, I start a host (using NetworkManager.StartHost()) and then in another game instance start another host on the same port the NetworkManager gives an error in the editor (StartServer listen failed.). I also had problems trying to join a server which gives similar errors that a can’t catch. Now my question is: how do I catch this error and display ingame that something went wrong? I know about the OnClientError and OnServerError but these will not run in the example above.

Furthermore, when I’m trying to join a server (using NetworkManager.StartClient()) and no server is running on that IP-adress and port it tries to connect for a couple of seconds and then runs the OnClientError function. My second question is: how do I control the time it tries to connect and display an error faster that something went wrong?

I know I’m 3 years late but the answer to your second question is:

You can also set the timeout in the ConnectionConfig section of your NetworkManager, if your Inspector is in Debug Mode: