Handled cancelled tasks for websocket startup

- Fail with a generic error if task is cancelled

#2169