Handle off-Lighthouse version checks

Summary: This is tanking our success rates, but is an expected behaviour.

Reviewed By: jknoxville

Differential Revision: D23001697

fbshipit-source-id: 48bcdb99543d590d544cce8322950568a0ef5c6f
This commit is contained in:
Pascal Hartig
2020-08-11 11:15:43 -07:00
committed by Facebook GitHub Bot
parent 45d1abf2d4
commit 4bb110f319

View File

@@ -70,6 +70,13 @@ export async function checkForUpdate(
case 204:
return {kind: 'up-to-date'};
case 200:
if (res.url.startsWith('https://www.facebook.com/login/')) {
// We're being redirected because we're not on an authenticated network.
// Treat that as being up-to-date as there's special-casing the UI for
// this is not worth it.
console.log('Skipping version check on non-authenticated network.');
return {kind: 'up-to-date'};
}
return res.json().then(parseResponse);
default:
return {