You get the error only when you try to use any service. I think i would be better to return every error from connect_to_endpoint and connect_to_endpoint_id. Or at least give a possibility to check if the session is successful established, with out using a service. This would simplify the client logic.
Currently it is possible that Client connect_to_endpoint and connect_to_endpoint_id can fail and still return a session. See: https://github.com/locka99/opcua/blob/89ea484783038f96448822c095c2b3acf4bb6719/client/src/client.rs#L218-L228.
You get the error only when you try to use any service. I think i would be better to return every error from connect_to_endpoint and connect_to_endpoint_id. Or at least give a possibility to check if the session is successful established, with out using a service. This would simplify the client logic.