Skip to content

Commit

Permalink
Add username to user lookup error
Browse files Browse the repository at this point in the history
  • Loading branch information
berlam committed Oct 4, 2019
1 parent aa8d99c commit bf8b3f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/jira/v2/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ func (api Api) User(user *pkg.User) (model.Account, *time.Location, error) {
return "", nil, err
}
if response.StatusCode != 200 {
if response.StatusCode == 404 {
return "", nil, fmt.Errorf("found no user for %s", user.DisplayName)
}
return "", nil, fmt.Errorf(response.Status)
}

Expand Down

0 comments on commit bf8b3f9

Please sign in to comment.