freedomofpress / securedrop-client

a Qt-based GUI for SecureDrop journalists 📰🗞️
GNU Affero General Public License v3.0
42 stars 39 forks source link

File Download animation continues after failed download #1451

Open rocodes opened 2 years ago

rocodes commented 2 years ago

Description

When a file download fails, the flashed/banner message appears in the top pane indicating a failure, but the file download animation continues.

Steps to Reproduce

in downloads.py, modify FileDownloadJob.call_api() to throw an immediate error:

    def call_download_api(self, api: API, db_object: File) -> Tuple[str, str]:
        """
        Override DownloadJob.
        """
        raise DownloadException(
                f"Failed to download {db_object.uuid}", type(db_object), db_object.uuid
            )

Expected Behavior

Error banner message is displayed, file download animation stops, and "encrypted file on server" is shown

Actual Behavior

Error banner message is displayed, file download animation continues, and "Downloading..." continues to be displayed.

download_failed

rocodes commented 2 years ago

@gonzalo-bulnes Is this currently on your plate? Any objections if I label it as a good first issue before the hackathon?

gonzalo-bulnes commented 2 years ago

Sounds good @rocodes 👍