Skip to content
Snippets Groups Projects
Commit 2fd6e256 authored by ale's avatar ale
Browse files

Calling a sharded service without a shard is now an error

parent 6916834d
Branches
Tags
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment