2 Commits
1.0.2 ... 1.0.3

Author SHA1 Message Date
8be1c59065 handle api return codes 2025-03-23 22:13:01 +01:00
dde049fb75 Update README.md 2025-03-23 16:01:01 +01:00
2 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,3 @@
# ALHP.NOGO
# ALHP.utils
Utility to check if one of your packages is building

View File

@@ -127,6 +127,12 @@ func ALHPBuildQueuePkgbase() ([]string, error) {
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("ALHP api returned HTTP %d", resp.StatusCode)
} else if resp.StatusCode == http.StatusNotFound {
return nil, nil
}
bResp, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err