Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

chore(updater): drop narration comments (CodeRabbit nitpicks)

AdityaUmale532c921563e7
diff --git a/electron/update-errors.mjs b/electron/update-errors.mjs
index c25117f09c..55b0c10dc9 100644
--- a/electron/update-errors.mjs
+++ b/electron/update-errors.mjs
@@ -24,8 +24,8 @@ export function updateErrorCode(error) {
const integrity = /ERR_UPDATER_(?:INVALID_SIGNATURE|CHECKSUM_MISMATCH)/i.test(detail);
const tls = /CERT_|ERR_TLS_|UNABLE_TO_VERIFY_LEAF_SIGNATURE|SSL_ERROR|SELF_SIGNED_CERT_IN_CHAIN/i.test(detail);
if (!integrity && tls) return "tls";
- // The same error wraps a failed GitHub request, such as a 504 while looking up the latest release;
- // checked before the text scan below, since the server's error page may say anything.
+ // The same error wraps a failed GitHub request, such as a 504 while looking up the latest release.
+ // The server's error page may contain text that matches another error category.
if (!integrity && /ERR_UPDATER_INVALID_RELEASE_FEED/.test(detail) && /HttpError: 5\d\d\b/.test(message)) return "network";
// Integrity failures must never be explained away as a network/disk issue.
if (integrity || /checksum|signature|codesign/i.test(detail)) return "integrity";
diff --git a/electron/update-errors.node-test.mjs b/electron/update-errors.node-test.mjs
index f16ebf8b37..47d82cb3e8 100644
--- a/electron/update-errors.node-test.mjs
+++ b/electron/update-errors.node-test.mjs
@@ -43,7 +43,6 @@ test("a server error wrapped with the release feed is a network failure, whateve
);
assert.equal(updateErrorNeedsPerson(error), false);
assert.match(updateErrorMessage(error), /connection and try again/);
- // the server's own error page may mention a signature too
const page = Object.assign(new Error(`Cannot parse releases feed: Error: Unable to find latest version on GitHub: HttpError: 502 Bad Gateway\n"<html>upstream signature check timed out</html>"\nXML:\n${feed}`), { code: "ERR_UPDATER_INVALID_RELEASE_FEED" });
assert.equal(updateErrorNeedsPerson(page), false);
assert.match(updateErrorMessage(page), /connection and try again/);