From cf48aab48d244018ea238ed70e0e2a10035de536 Mon Sep 17 00:00:00 2001 From: "Jieyi Long (THETA Network)" Date: Tue, 24 Jan 2023 08:22:55 -0800 Subject: [PATCH] Fix GetAccount 500 error --- rpc/query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/query.go b/rpc/query.go index b00d822..21ed59c 100644 --- a/rpc/query.go +++ b/rpc/query.go @@ -86,7 +86,7 @@ func (t *ThetaRPCService) GetAccount(args *GetAccountArgs, result *GetAccountRes blocks := t.chain.FindBlocksByHeight(height) if len(blocks) == 0 { result.Account = nil - return nil + return fmt.Errorf("Historical data at given height is not available on current node") } deliveredView, err := t.ledger.GetDeliveredSnapshot()