Skip to content

Commit

Permalink
Report error if job pod was found but log is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
fridex committed Jun 14, 2019
1 parent 5ff7e0b commit 203eb15
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions amun/api_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ def get_inspection_job_log(inspection_id: str) -> tuple:
'parameters': parameters
}, 404

if not log:
return {
'error': 'Inspection run did not produce any log or it was deleted by OpenShift',
'parameters': parameters,
}, 404

try:
log = json.loads(log)
except Exception as exc:
Expand Down

0 comments on commit 203eb15

Please sign in to comment.