Skip to content

Bug: Typedapi Nodes.Info().Do() returns json unmarshalling error. #911

@hellconnon

Description

@hellconnon

Hey,

when using the typed api client like this:

	esClientSbx, _ := elasticsearch.NewTypedClient(config)
	ctx := context.Background()

	nodesInfo, err := esClientSbx.Nodes.Info().Do(ctx)
	if err != nil {
		fmt.Println("Err: ", err)
	}
	fmt.Println("Info: ",nodesInfo)

i get the following error:

❯ go run .
Err:  Settings | Data | json: cannot unmarshal string into Go value of type []string
Info:  <nil>

I couldn't exactly track down which specific field causes the error.

Edit: I used the filter_path incorrectly and removed the part. The main issue is that the json response cannot be unmarshalled into the info.Response struct anyways.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions