Swap the URLError and HTTPError exception handlers. HTTPError is a subclass
of URLError, so the HTTPError handler wasn't being reached.
Change-Id: Iec86d2b345dbd37858af888bbd54a74884025eda
Add a handler for URLError, so that we print a nicer error message if stack
cannot connect to the server.
Change-Id: I24f977dcb12bee3bb21057fe9b19823d98581141