From 58db5754b686f24a39aa5e7f9621dfb9f08b70cc Mon Sep 17 00:00:00 2001 From: trevor-signal <131492920+trevor-signal@users.noreply.github.com> Date: Tue, 19 Aug 2025 15:44:18 -0400 Subject: [PATCH] Update behavior on timeout retrieving archive --- ts/textsecure/WebAPI.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts/textsecure/WebAPI.ts b/ts/textsecure/WebAPI.ts index 54e69c6786..5f0c3066db 100644 --- a/ts/textsecure/WebAPI.ts +++ b/ts/textsecure/WebAPI.ts @@ -2796,10 +2796,12 @@ export function initialize({ // Add a bit of leeway to let server respond properly timeout: (requestTimeoutInSecs + 15) * SECOND, abortSignal, - zodSchema: TransferArchiveSchema, + // We may also get a 204 with no content, indicating we should try again + zodSchema: TransferArchiveSchema.or(z.literal('')), }); if (response.status === 200) { + strictAssert(data !== '', '200 must have data'); return data; }