Skip to content

Commit

Permalink
breaking: Fail with no entries
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasMerz committed Jan 3, 2021
1 parent 2b2fc10 commit 0da84c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ async function getMetric(metric) {

const response = await res.json();
console.log("Got entries:", response.data.length);

if (response.data.length === 0) {
core.setFailed("No entries");
}

writeToCSV(response.data, metric);
} catch (e) {
console.error("Request failed".url);
Expand Down

0 comments on commit 0da84c7

Please sign in to comment.