Do not try to download export files for failed vulnerability export jobs
Summary
Currently we are trying to download the export file of a vulnerability export even if the job has status failed
. We should download the export file only if the job status is finished
.
Steps to reproduce
- Change the
VulnerabilityExports::ExportWorker
class to raise runtime exception - Try to create instance or project-level vulnerability export by clicking the button on security dashboard
Example Project
Reproducing this on staging & production would be hard.
What is the current bug behavior?
It tries to download a file for failed export job.
What is the expected correct behavior?
It should give an error message to user if the job is failed.
Relevant logs and/or screenshots
Implementation plan
-
frontend Initiate the download only when the job status is
finished
.
Edited by Savas Vedova