diff --git a/plugins/alt-fetch/index.js b/plugins/alt-fetch/index.js index 124217a..61eba29 100644 --- a/plugins/alt-fetch/index.js +++ b/plugins/alt-fetch/index.js @@ -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);