From 3af336a34ac0d28393088a05c13f95c5011d41b8 Mon Sep 17 00:00:00 2001 From: Eric Meyer Date: Mon, 4 Dec 2017 13:30:57 -0600 Subject: [PATCH] Return invalid state attribute in appropriate branch --- pkg/geth/contract.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/geth/contract.go b/pkg/geth/contract.go index 3c3f812c..c1b08aa8 100644 --- a/pkg/geth/contract.go +++ b/pkg/geth/contract.go @@ -51,7 +51,7 @@ func (blockchain *GethBlockchain) GetAttribute(contract core.Contract, attribute } input, err := parsed.Pack(attributeName) if err != nil { - return nil, err + return nil, ErrInvalidStateAttribute } output, err := callContract(contract, input, err, blockchain, blockNumber) if err != nil { @@ -59,7 +59,7 @@ func (blockchain *GethBlockchain) GetAttribute(contract core.Contract, attribute } err = parsed.Unpack(&result, attributeName, output) if err != nil { - return nil, ErrInvalidStateAttribute + return nil, err } return result, nil }