Improve error on router without service.
Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
parent
c39a550b00
commit
1800b0b69c
13 changed files with 125 additions and 40 deletions
|
@ -35,8 +35,9 @@ func (m *Manager) BuildTCP(rootCtx context.Context, serviceName string) (tcp.Han
|
|||
return nil, fmt.Errorf("the service %q does not exist", serviceQualifiedName)
|
||||
}
|
||||
if conf.LoadBalancer == nil {
|
||||
conf.Err = fmt.Errorf("the service %q doesn't have any TCP load balancer", serviceQualifiedName)
|
||||
return nil, conf.Err
|
||||
err := fmt.Errorf("the service %q doesn't have any TCP load balancer", serviceQualifiedName)
|
||||
conf.AddError(err, true)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
logger := log.FromContext(ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue