Skip to content

Commit

Permalink
Merge pull request #106 from aliceinwire/results_fixes
Browse files Browse the repository at this point in the history
results: Throw error if no data is found
  • Loading branch information
aliceinwire authored Jan 29, 2025
2 parents aee25af + 01922cd commit a8286db
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion kcidev/subcommands/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ def dashboard_api_fetch(endpoint, params):
except:
click.secho(f"Failed to fetch from {DASHBOARD_API}.")
raise click.Abort()
data = r.json()

return r.json()
# check for errors in json data
if "error" in data:
kci_msg("json error: " + str(data["error"]))
raise click.Abort()

return data


def dashboard_fetch_summary(origin, giturl, branch, commit):
Expand Down

0 comments on commit a8286db

Please sign in to comment.