abstracted the websockets.send method so we get a nice error message instead of a crash.