diff --git a/ts/textsecure/WebAPI.ts b/ts/textsecure/WebAPI.ts index 54e69c67862..5f0c3066dbf 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; }