Skip to content

web: an export cut off mid-transfer says the server could not be reached #129

Closed

Description

@TusanHomichi

Existing issue check

  • I searched open and closed issues. None found.

Problem or outcome

downloadExport in web/src/lib/api.ts reads the whole streamed response into a Blob before handing it to the browser. When a transfer ends part way, response.blob() rejects with a non-ApiError, and the page then says "the server could not be reached". That is wrong: the server was reached and started the archive, but the transfer ended incomplete.

ADR 0014 designs incomplete transfers to fail visibly, and the server side does: there is no terminal chunk, and the verifier refuses the partial file. The message tells the operator the wrong thing to do next. This affects every export on the home page, the enrollment page, and the drafts page, and has done so since the record export was added. The independent review of #98 found it (round 2, R6).

Outcome

Distinguish three cases in the operator's message: a typed refusal (the existing ApiError path), a failure to connect, and a transfer that started and then ended incomplete ("the export did not finish; download it again"). Keep the existing guarantee that a partial archive is never saved.

Acceptance criteria

  • A browser test interrupts an export mid-transfer and asserts the incomplete-transfer message, with no download saved.
  • The existing refusal and unreachable paths keep their messages.

Related

ADR 0014 (delivery), #98.

Activity

  1. added
    ready
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions