diff --git a/flow/cmd/peer_data.go b/flow/cmd/peer_data.go index 73d1b8310e..4bde101258 100644 --- a/flow/cmd/peer_data.go +++ b/flow/cmd/peer_data.go @@ -42,8 +42,8 @@ func (h *FlowRequestHandler) getSFPeerConfig(ctx context.Context, peerName strin } unmarshalErr := proto.Unmarshal(sfPeerOptions, &sfPeerConfig) - if err != nil { - return nil, unmarshalErr + if unmarshalErr != nil { + return nil, fmt.Errorf("failed to unmarshal protobuf: %w", unmarshalErr) } return &sfPeerConfig, nil