clarifying comment in alt-fetch plugin code

master
Michał 'rysiek' Woźniak 2024-02-28 02:57:08 +00:00
rodzic 2406bca941
commit f5facd288a
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -105,6 +105,10 @@
))
.then((response) => {
// 4xx? 5xx? that's a paddlin'
// NOTICE: normally 4xx errors are returned to the client by other plugins,
// NOTICE: but here we are relying on multiple alternative endpoints;
// NOTICE: so, we want to maximize the chance that we get *something* useful
// TODO: shouldn't this reject() instead
if (response.status >= 400) {
// throw an Error to fall back to other plugins:
throw new Error('HTTP Error: ' + response.status + ' ' + response.statusText);