Skip to content

[Bug] Nil pointer deref in res.Usage in ListVectors call #90

@Southclaws

Description

@Southclaws

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing Github issues and Community Forum, and I could not find an existing post for this bug

Describe the bug

Upon calling ListVectors it fails with a nil pointer panic. While debugging, I can see the field the code is trying to read is nil.

image

Error information

After the grpc call to res, err := (*idx.dataClient).List(idx.akCtx(ctx), req) err is nil but res looks malformed, the res.Usage pointer is nil but the current code tries to read ReadUnits without first checking Usage for nil.

Steps to reproduce the issue locally

Call ListVectors with any args, it seems.

Environment

  • Go SDK version: v1.1.1

Metadata

Metadata

Labels

bugSomething isn't workingstatus:needs-triageAn issue that needs to be triaged by the Pinecone team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions