mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
Merge pull request #423 in YUNIONIO/onecloud from ~ZHOUYOUSONG/onecloud:bugfix/yousong-lb to release/2.3.0
* commit 'afb881229d4369e502b72ff5d9e05c49480109a9': loadbalancerlisteners: return 409 on port conflict
This commit is contained in:
@@ -117,8 +117,8 @@ func (man *SLoadbalancerListenerManager) checkListenerUniqueness(ctx context.Con
|
||||
var listener SLoadbalancerListener
|
||||
q.First(&listener)
|
||||
if len(listener.Id) > 0 {
|
||||
return fmt.Errorf("%s listener port %d is already taken by listener %s",
|
||||
listenerType, listenerPort, listener.Id)
|
||||
return httperrors.NewConflictError("%s listener port %d is already taken by listener %s(%s)",
|
||||
listenerType, listenerPort, listener.Name, listener.Id)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user