firefoxhttpresponsehttp-status-codesdevtools

In Firefox DevTools Network tab, how to see only failed requests?


I want to be able to see all requests that have error responses (of any kind). By that, I mean requests that have a response with a status code like "4xx" or "5xx".

I discovered that I can type status-code:200 into the search bar to get only successful requests (that aren't redirects), but I can't type that in for all errors (because there are many error codes).


Solution

  • Firefox's manual describes a [-]status-code:n filter you can use in the Network tab, though it only supports filtering-only (or filtering-out-only) individual codes (rather than ranges).

    https://firefox-source-docs.mozilla.org/devtools-user/network_monitor/request_list/#filtering-by-properties

    In my experience, it's probably easier to filter-out known good responses so that all other responses: including errors and unexpected/unusual status-codes, remain; so you'll need something like this:

    -status-code:200 -status-code:201 -status-code:204 -status-code:300 -status-code:301 -status-code:302 -status-code:303 -status-code:304
    

    Note that Firefox will filter-out failed requests that were blocked by filters/extensions with, for example, the -status-code:200 and -status-code:204 filters, despite the lack of a green mark in the HTTP Status column.

    Before:

    enter image description here

    After:

    enter image description here