diff --git a/pkg/routing/boltdb_routing_table.go b/pkg/routing/boltdb_routing_table.go index 1e85ea6a9b..033a6da9cc 100644 --- a/pkg/routing/boltdb_routing_table.go +++ b/pkg/routing/boltdb_routing_table.go @@ -76,7 +76,9 @@ func (rt *boltDBRoutingTable) Rule(routeID RouteID) (Rule, error) { rule = b.Get(binaryID(routeID)) return nil }) - + if rule == nil { + return nil, fmt.Errorf("rule of routeID '%v' does not exist", routeID) + } return rule, err }