More aggressively filter failed to fetch

Reviewed By: jknoxville

Differential Revision: D32674487

fbshipit-source-id: dab9d29c326d2a5e7a49fe55656ee06c0742eb69
This commit is contained in:
Pascal Hartig
2021-11-26 03:50:18 -08:00
committed by Facebook GitHub Bot
parent 921a4ae729
commit 9773e79724

View File

@@ -21,7 +21,10 @@ export function isConnectivityOrAuthError(
return (
err instanceof ConnectivityError ||
isAuthError(err) ||
String(err).startsWith('Failed to fetch')
String(err).startsWith('Failed to fetch') ||
// In cases where the error message is wrapped but the
// underlying core issue is still a fetch failure.
String(err).endsWith('Failed to fetch')
);
}