cs50/cs50.vsix

Catch exceptions when plugin can't be reached, as via command50 and prompt50

dmalan opened this issue · 1 comments

E.g.:

$ update50
Traceback (most recent call last):
  File "/usr/local/bin/prompt50", line 33, in <module>
    sys.exit(load_entry_point('CS50-VSIX-Client==1.0.0', 'console_scripts', 'prompt50')())
  File "/usr/local/lib/python3.10/site-packages/prompt50/__main__.py", line 14, in main
    asyncio.get_event_loop().run_until_complete(prompt(args.title, args.body, args.action))
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.10/site-packages/prompt50/__main__.py", line 18, in prompt
    websocket = await websockets.connect(SOCKET_URI)
  File "/usr/local/lib/python3.10/site-packages/websockets/legacy/client.py", line 649, in __await_impl_timeout__
    return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 447, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.10/site-packages/websockets/legacy/client.py", line 653, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1063, in create_connection
    raise OSError('Multiple exceptions: {}'.format(
OSError: Multiple exceptions: [Errno 111] Connect call failed ('::1', 3051, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 3051)
Unable to update codespace. Try again in a few minutes!