Skip to content

Commit

Permalink
Throw error on non-2XX returned from github api
Browse files Browse the repository at this point in the history
provided by @himorin at #1010 but added in this commit because large amounts of reformatting of the file had introduced conflicts since the original PR was submitted
  • Loading branch information
r12a committed Jan 20, 2021
1 parent ad5ac19 commit 7202d8e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions textlayout/resources/gap-analysis-github.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function getAllData (repo, doc) {
function (responses) {
return Promise.all(responses.map(
function(res) {
if (! res.ok) throw Error("GitHub API error " + res.status + " on " + res.url)
return res.json()
}
))
Expand Down

0 comments on commit 7202d8e

Please sign in to comment.