Skip to content

Commit 9d187fa

Browse files
author
Douglas Creager
committed
Require 4xx and 5xx results to be http.error
1 parent e53af0c commit 9d187fa

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

index.html

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ <h2>Dependencies</h2>
146146
<dd>
147147
<p>The following terms are defined in the HTTP specification: [[!RFC7231]]</p>
148148
<ul>
149-
<li><dfn data-cite="!RFC7231#section-6.6">5xx status code</dfn></li>
149+
<li><dfn data-lt="4xx" data-cite="!RFC7231#section-6.5">4xx status code</dfn></li>
150+
<li><dfn data-lt="5xx" data-cite="!RFC7231#section-6.6">5xx status code</dfn></li>
150151
<li><dfn data-cite="!RFC7231#section-3">resource representation</dfn></li>
151152
<li><dfn data-cite="!RFC7231#section-6">status code</dfn></li>
152153
</ul>
@@ -235,10 +236,11 @@ <h2>Network error reports</h2>
235236
</ul>
236237

237238
<p>
238-
The user agent MAY classify and report server error responses (<a>5xx
239-
status code</a>) as network errors. For example, a network error report
240-
may be triggered when a fetch fails due to proxy or gateway errors,
241-
service downtime, and other types of server errors.
239+
The user agent MUST classify and report HTTP error responses (i.e., those
240+
with a <a>4xx</a> or <a>5xx</a> status code) as network errors. For
241+
example, a network error report must be triggered when a fetch fails due
242+
to proxy or gateway errors, service downtime, and other types of client or
243+
server errors.
242244
</p>
243245

244246
<p>
@@ -249,11 +251,11 @@ <h2>Network error reports</h2>
249251

250252
<p class="note">
251253
Note that the above definition of "network error" is different from
252-
definition in [[Fetch]]. The definition of <a>network error</a> in this
253-
specification is a subset of [[Fetch]] definition – i.e. all of the above
254-
conditions would trigger a "network error" in [[Fetch]] processing, but
255-
conditions such as blocked requests due to mixed content, CORS failures,
256-
etc., would not.
254+
definition in [[FETCH]]. For example, <a>4xx</a> and <a>5xx</a> status
255+
codes are not considered a "network error" by [[FETCH]], but here are
256+
considered a <a>network error</a> with a type <code>http.error</code>.
257+
Other conditions, such as blocked requests due to mixed content or CORS
258+
failures, are considered "network errors" by [[FETCH]], but not by NEL.
257259
</p>
258260

259261
<p>
@@ -370,6 +372,9 @@ <h2>Network error reports</h2>
370372

371373
</dl>
372374
<dl class='reportTypeGroup'>
375+
<dt>http.error</dt>
376+
<dd>The HTTP response had a <a>4xx</a> or <a>5xx</a> status code</dd>
377+
373378
<dt>http.protocol.error</dt>
374379
<dd>The connection was aborted due to an HTTP protocol error</dd>
375380

0 commit comments

Comments
 (0)