Fix handling URLErrors in GitHub without an HTTP status code.
Review Request #13303 — Created Oct. 4, 2023 and submitted
The HTTP error handler in GitHub was assuming that error classes always
had an HTTP status code, but this is only the case for
URLError. If an error occurs due to an outage or something other
than an HTTP response, we'd crash.
This fixes the code to provide an HTTP status code only if it exists on
the error object.
Turned off wifi and attempted to load a diff locally. Saw an error about
issues accessing the file, rather than a crash traceback.