Skip to content

status.documentResponses not always returned #1379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
toptobes opened this issue Aug 29, 2024 · 0 comments
Open

status.documentResponses not always returned #1379

toptobes opened this issue Aug 29, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@toptobes
Copy link

When an insertMany call with $vectorize fails, the status.documentResponses field may be completely absent.

For example, given the following call:

const insertManyResult = await collection.insertMany([
  { name: 'Alice', age: 30, $vectorize: 'Alice likes big red cars', key },
  { name: 'Bob', age: 40, $vectorize: 'Cause maybe, you\'re gonna be the one that saves me... and after all, you\'re my wonderwall...', key },
  { name: 'Charlie', age: 50, $vectorize: 'The water bottle was small', key },
]);

the following response was returned:

{
  errors: [{
    message: 'The timeout period of 5000ms has been exceeded while executing POST /embeddings for server null',
    errorCode: 'SERVER_UNHANDLED_ERROR',
  }],
}

This breaks the supposed invariant of status.documentResponses always being present, and forces users to awkwardly deal with two completely different error types for this one single command.

While this behavior may be acceptable for something like a malformed request, where the user may have made the screw-up, this is very unintuitive for just typical $vectorize calls—especially when you're using the clients and would (likely) never see any "Bad Request" errors or anything of the like.

@amorton amorton added the Bug Something isn't working label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants