Skip to content

Commit 4857447

Browse files
Merge pull request #226 from sosiouxme/20250313-jira-bogus-response
better info when Jira response is bogus
2 parents 7a686cd + d1659fd commit 4857447

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/jira/ocpbugs.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"strconv"
88
"time"
99

10+
"github.com/pkg/errors"
1011
log "github.com/sirupsen/logrus"
1112

1213
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1"
@@ -23,15 +24,15 @@ func GetJiraComponents() (map[string]int64, error) {
2324
var components []v1.JiraComponent
2425
err = json.Unmarshal(body, &components)
2526
if err != nil {
26-
return nil, err
27+
return nil, errors.WithMessage(err, "response from jira: "+string(body))
2728
}
2829

2930
ids := make(map[string]int64)
3031
for _, c := range components {
3132
jiraID, err := strconv.ParseInt(c.ID, 10, 64)
3233
if err != nil {
33-
msg := "error parsing jira ID"
34-
log.WithError(err).Warn(msg)
34+
log.WithError(err).Warnf("error parsing jira ID '%s'", c.ID)
35+
continue
3536
}
3637

3738
ids[c.Name] = jiraID

0 commit comments

Comments
 (0)