From ec5358773ed486023096558bb72600c12e50bb57 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Mon, 31 Oct 2022 13:23:11 +0000 Subject: [PATCH] statemanager call function will return call information even if call errors --- chain/stmgr/call.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/chain/stmgr/call.go b/chain/stmgr/call.go index 2d0d8f047..3c40ced53 100644 --- a/chain/stmgr/call.go +++ b/chain/stmgr/call.go @@ -133,9 +133,7 @@ func (sm *StateManager) Call(ctx context.Context, msg *types.Message, ts *types. // TODO: maybe just use the invoker directly? ret, err := vmi.ApplyImplicitMessage(ctx, msg) - if err != nil { - return nil, xerrors.Errorf("apply message failed: %w", err) - } + // Don't check for error here, we want to bubble it up, but also return ret as an InvocResult var errs string if ret.ActorErr != nil { @@ -150,8 +148,7 @@ func (sm *StateManager) Call(ctx context.Context, msg *types.Message, ts *types. ExecutionTrace: ret.ExecutionTrace, Error: errs, Duration: ret.Duration, - }, nil - + }, err } func (sm *StateManager) CallWithGas(ctx context.Context, msg *types.Message, priorMsgs []types.ChainMsg, ts *types.TipSet) (*api.InvocResult, error) {