From 32ef57c476e8a9eceb853399e22d81a2e5d14146 Mon Sep 17 00:00:00 2001 From: Dirk McCormick Date: Wed, 21 Mar 2018 22:58:32 -0400 Subject: [PATCH] Return ErrNotFound when zero values are returned from DHT namesys resolve License: MIT Signed-off-by: Dirk McCormick --- namesys/routing.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/namesys/routing.go b/namesys/routing.go index 29b26cdbd..ccf305066 100644 --- a/namesys/routing.go +++ b/namesys/routing.go @@ -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