From a626b3e62c7584117fca1cce0566ac731eb11cec Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 9 Aug 2023 12:12:30 -0700 Subject: [PATCH] fix: gateway: return an error when an Eth filter is not found Previously, we'd just return nothing. --- gateway/proxy_eth.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gateway/proxy_eth.go b/gateway/proxy_eth.go index a07ead16cf3..e5954c2ff00 100644 --- a/gateway/proxy_eth.go +++ b/gateway/proxy_eth.go @@ -16,6 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/chain/events/filter" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types/ethtypes" ) @@ -427,7 +428,7 @@ func (gw *Node) EthGetFilterChanges(ctx context.Context, id ethtypes.EthFilterID ft.lk.Unlock() if !ok { - return nil, nil + return nil, filter.ErrFilterNotFound } return gw.target.EthGetFilterChanges(ctx, id)