Skip to content

Commit

Permalink
Add default for the parseCanonical object assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
shleikes committed Sep 22, 2024
1 parent 3e16110 commit d1c81ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions protocol/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,14 @@ func parseCanonical(rpcInput RPCInput, input []string, dataSource int) ([]interf
}

blockContainer = blockContainerTyped[param_index]
default:
return nil, utils.LavaFormatWarning("invalid parser input format, blockContainer is not map[string]interface{} nor []interface{}", ValueNotSetError,
utils.LogAttr("params", rpcInput.GetParams()),
utils.LogAttr("method", rpcInput.GetMethod()),
utils.LogAttr("blockContainer", fmt.Sprintf("%v", blockContainer)),
utils.LogAttr("key", key),
utils.LogAttr("unmarshaledDataTyped", unmarshalledDataTyped),
)
}
}
retArr := make([]interface{}, 0)
Expand Down

0 comments on commit d1c81ca

Please sign in to comment.