Commit 559fed79 authored by Antoine Millet's avatar Antoine Millet
Browse files

Catch error from node on console call

parent 59ae2df2
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -938,7 +938,11 @@ class CliHandler(RegisteredCCHandler):
        for obj in objects:
            if obj['r'] in ('vm',):
                client = self.server.get_client(obj['p'])
                try:
                    srv_to_host_tun = client.console(obj['h'])
                except Exception as err:
                    errs.error(obj['id'], str(err))
                else:
                    cli_tun = self.client.register_tunnel('console', client, srv_to_host_tun)
                    errs.success(obj['id'], 'tunnel started.', output=cli_tun.label)
            else: