Open Bug 1361492 Opened 3 years ago Updated 2 years ago

Network monitor and its HAR captures should record details of network errors

Categories

(DevTools :: Netmonitor, enhancement, P3)

53 Branch
enhancement

Tracking

(Not tracked)

People

(Reporter: zwol, Unassigned)

References

(Blocks 1 open bug)

Details

When you load a URL that will produce a network error, e.g. http://nonexistent.invalid/ (DNS resolution failure) or https://wrong.host.badssl.com/ (TLS error - certificate invalid), the network monitor doesn't show any useful details about what went wrong, and "Save All as HAR" produces a generic 'response' record, the same for _all_ network errors:

        "response": {
          "status": 0,
          "statusText": "",
          "httpVersion": "",
          "headers": [],
          "cookies": [],
          "content": {
            "mimeType": "text/plain",
            "size": 0,
            "encoding": "base64",
            "text": ""
          },
          "redirectURL": "",
          "headersSize": -1,
          "bodySize": -1
        },

At least this is different from what I get for an HTTP error.  Firefox 53 does have a "Security" subtab in the network monitor that explains what happened for TLS errors, but it's no help with DNS errors, connection refused, etc., and no useful information appears in the HAR file.

I'd like to see clear and precise indications in both the waterfall and the "Response" subtab when a network error happens, and precise information recorded in a HAR export.  "Precise" means at least sufficient to distinguish all of the following from each other and from HTTP errors

 * DNS NXDOMAIN
 * DNS other kind of failure
 * TCP connection refused
 * TCP connection reset
 * TCP host or network unreachable
 * TLS-level protocol error
 * Certificate rejected
 * HTTP-level protocol error (like, the server sent back nonsense).

TIA.
One more thing: whenever there's a problem with TLS (not just certificate errors), it would be immensely helpful to capture the exact set of certificates and maybe even the entire sequence of handshake packets.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.