Skip to content

Commit

Permalink
Fix error message instead
Browse files Browse the repository at this point in the history
  • Loading branch information
vytautas-karpavicius committed Jan 26, 2022
1 parent a6899d7 commit 79cf2db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/domain/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
)

var (
errFailoverTooFrequent = &types.ServiceBusyError{Message: "The domain failovers too frequent."}
errDomainUpdateTooFrequent = &types.ServiceBusyError{Message: "Domain update too frequent."}
)

type (
Expand Down Expand Up @@ -510,8 +510,8 @@ func (d *handlerImpl) UpdateDomain(
if configurationChanged || activeClusterChanged {
now := d.timeSource.Now()
// Check the failover cool down time
if activeClusterChanged && lastUpdatedTime.Add(d.config.FailoverCoolDown(info.Name)).After(now) {
return nil, errFailoverTooFrequent
if lastUpdatedTime.Add(d.config.FailoverCoolDown(info.Name)).After(now) {
return nil, errDomainUpdateTooFrequent
}

// set the versions
Expand Down

0 comments on commit 79cf2db

Please sign in to comment.