Skip to content

Commit

Permalink
RELTEC-12197: fix user not found should not result in a returning error
Browse files Browse the repository at this point in the history
  • Loading branch information
Knupfer, Raffael committed Feb 13, 2025
1 parent 6025287 commit 0b8dfda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/service/mapper/owner.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ func (s *Impl) getExisingUsers(ctx context.Context, usernames []string) ([]strin
for _, username := range usernames {
bbUser, err := vcs.GetUser(ctx, username)
if err != nil {
if httperror.Is(err) && err.(*httperror.Impl).Status() == http.StatusNotFound {
if httperror.Is(err) && err.(*httperror.Impl).Status() == http.StatusNotFound ||
strings.Contains(err.Error(), "404") {
s.Logging.Logger().Ctx(ctx).Warn().Printf("bitbucket user %s does not exist", username)
continue
}
Expand Down

0 comments on commit 0b8dfda

Please sign in to comment.