Commit be064a91 authored by Daniele Venzano's avatar Daniele Venzano

Handle errors streaming log files

parent d9e9325d
......@@ -72,8 +72,11 @@ class WebSocketEndpointWeb(ZoeWSRequestHandler):
response['endpoints'] = endpoints
self.write_message(response)
elif request['command'] == 'service_logs':
try:
log_obj = self.api_endpoint.service_logs(self.current_user, request['service_id'])
except zoe_api.exceptions.ZoeException as e:
self.write_message(str(e))
else:
while not self.connection_closed:
try:
log_line = yield THREAD_POOL.submit(next, log_obj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment