Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ukff committed Oct 3, 2024
1 parent 54ca8f2 commit 8b6e0e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/globalaccounts/globalaccounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,20 @@ func dbOp(us *unstructured.Unstructured, db storage.BrokerStorage, logs *logrus.
}
if len(instances) == 0 {
logs.Errorf("no instance for runtime id %s", runtimeId)
return internal.Instance{}, err
return internal.Instance{}, fmt.Errorf("no instance for runtime id")
}
if len(instances) > 1 {
logs.Errorf("more than one instance for runtime id %s", runtimeId)
return internal.Instance{}, err
return internal.Instance{}, fmt.Errorf("more than one instance for runtime")
}
instance := instances[0]
if instance.SubAccountID == "" {
logs.Errorf("instance have empty SA %s", instance.SubAccountID)
return internal.Instance{}, err
return internal.Instance{}, fmt.Errorf("instance have empty SA")
}
if instance.GlobalAccountID == "" {
logs.Errorf("instance have empty GA %s", instance.GlobalAccountID)
return internal.Instance{}, err
return internal.Instance{}, fmt.Errorf("instance have empty GA")
}
return instance, nil
}
Expand Down

0 comments on commit 8b6e0e8

Please sign in to comment.