diff --git a/cmd/queue.go b/cmd/queue.go index 7f7ef5f..323d65e 100644 --- a/cmd/queue.go +++ b/cmd/queue.go @@ -22,7 +22,7 @@ func mostRecentReleasesForChain( number int16, ) (builder.HeighlinerQueuedChainBuilds, error) { if chainNodeConfig.GithubOrganization == "" || chainNodeConfig.GithubRepo == "" { - return builder.HeighlinerQueuedChainBuilds{}, fmt.Errorf("github organization: %s and/or repo: %s not provided for chain: %s\n", chainNodeConfig.GithubOrganization, chainNodeConfig.GithubRepo, chainNodeConfig.Name) + return builder.HeighlinerQueuedChainBuilds{}, fmt.Errorf("github organization: %s and/or repo: %s not provided for chain: %s", chainNodeConfig.GithubOrganization, chainNodeConfig.GithubRepo, chainNodeConfig.Name) } client := http.Client{Timeout: 5 * time.Second} @@ -47,6 +47,9 @@ func mostRecentReleasesForChain( if err != nil { return builder.HeighlinerQueuedChainBuilds{}, fmt.Errorf("error performing github releases request: %v", err) } + if res.StatusCode != http.StatusOK { + return builder.HeighlinerQueuedChainBuilds{}, fmt.Errorf("status code: %v", res.StatusCode) + } defer res.Body.Close()