Better error message when cache.add() fails due to non-200 response |
||||||
Issue descriptionVersion: M50+ OS: All What steps will reproduce the problem? Attempt a call to cache.add() with a Request that leads to a Response with a non-200 response code (e.g. a response code of 0, due it being a no-cors Request). There's an example of this at https://jsbin.com/yifava/edit?js,console What is the expected output? The cache.add() should reject with a meaningful error message letting the user know that the call failed because the response code was non-200. Since this is a non-obvious change in Cache Storage API behavior, it's particularly useful to explain why things went wrong. (The background behind this change is at https://github.com/slightlyoff/ServiceWorker/issues/823, and it's the correct behavior. It's just the error message that needs to improve.) What do you see instead? The error message is an unhelpful "Request failed", due to https://github.com/dstockwell/chromium/commit/d8a95558a04b5734bc5568546097799d942aaec5#diff-c0babf201659e01414abe4a511fb8c7cR218
,
Jul 25 2016
Note that this should only appear in an error when logged to the console, not in an error message visible to script (since otherwise we're leaking cross-origin details).
,
Jul 26 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 11 2017
,
Aug 13
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 18
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by sheriffbot@chromium.org
, Jun 25 2016