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

NEW
Unassigned

Status

P3
enhancement
2 years ago
6 months ago

People

(Reporter: zwol, Unassigned)

Tracking

(Blocks: 1 bug)

53 Branch

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
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.
Priority: -- → P3
(Reporter)

Comment 1

11 months ago
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.

Updated

6 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.