Commit 2fd6e256 authored by ale's avatar ale

Calling a sharded service without a shard is now an error

parent 6916834d
......@@ -104,7 +104,10 @@ func (b *balancedBackend) Call(ctx context.Context, shard, path string, req, res
}
var tg targetGenerator = b.backendTracker
if b.sharded && shard != "" {
if b.sharded {
if shard == "" {
return fmt.Errorf("call without shard to sharded service %s", b.baseURI.String())
}
tg = newShardedGenerator(shard, b.baseURI.Host, b.resolver)
}
seq := newSequence(tg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment