add details to exceptions generated during report render failures (#576)

This commit is contained in:
bmc-msft
2021-02-19 13:48:49 -05:00
committed by GitHub
parent 3a7bc95316
commit 872a5ddc14
2 changed files with 4 additions and 2 deletions

View File

@ -40,10 +40,10 @@ class Render:
self.filename = filename
task = Task.get(report.job_id, report.task_id)
if not task:
raise ValueError
raise ValueError(f"invalid task {report.task_id}")
job = Job.get(report.job_id)
if not job:
raise ValueError
raise ValueError(f"invalid job {report.job_id}")
self.task_config = task.config
self.job_config = job.config

View File

@ -117,3 +117,5 @@ def github_issue(
handler.process()
except GitHubException as err:
fail_task(report, err)
except ValueError as err:
fail_task(report, err)