fix(web): remove unrelated login changes

This commit is contained in:
Nimrod Gutman
2026-02-20 14:41:35 +02:00
committed by Nimrod Gutman
parent ac0c1c26b1
commit 741435aacd
2 changed files with 0 additions and 22 deletions

View File

@@ -80,22 +80,6 @@ describe("loginWeb coverage", () => {
expect(secondSock.ws.close).toHaveBeenCalled();
});
it("formats retry failure when restart login also closes", async () => {
formatErrorMock.mockReturnValueOnce("status=408 Request Time-out QR refs attempts ended");
waitForWaConnectionMock
.mockRejectedValueOnce({ output: { statusCode: 515 } })
.mockRejectedValueOnce({
output: {
statusCode: 408,
payload: { error: "Request Time-out", message: "QR refs attempts ended" },
},
});
await expect(loginWeb(false, waitForWaConnectionMock as never)).rejects.toThrow(
/status=408 Request Time-out QR refs attempts ended/i,
);
});
it("clears creds and throws when logged out", async () => {
waitForWaConnectionMock.mockRejectedValueOnce({
output: { statusCode: DisconnectReason.loggedOut },

View File

@@ -45,12 +45,6 @@ export async function loginWeb(
await wait(retry);
console.log(success("✅ Linked after restart; web session ready."));
return;
} catch (retryErr) {
const formatted = formatError(retryErr);
console.error(
danger(`WhatsApp Web connection ended after restart before fully opening. ${formatted}`),
);
throw new Error(formatted, { cause: retryErr });
} finally {
setTimeout(() => retry.ws?.close(), 500);
}