the issue with XHR compared with websockets is well defined error handling