refine error handling for URLFETCH
bugfix for `curl google.com`