Return ErrNotFound when zero values are returned from DHT namesys resolve

License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
This commit is contained in:
Dirk McCormick 2018-03-21 22:58:32 -04:00
parent 5202f76d1f
commit 32ef57c476

View File

@ -202,6 +202,10 @@ func (r *routingResolver) getValue(ctx context.Context, ipnsKey string, options
}
}
if len(recs) == 0 {
return nil, routing.ErrNotFound
}
i, err := IpnsSelectorFunc(ipnsKey, recs)
if err != nil {
return nil, err