Skip to content
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

Refine the error messages on saveObjects #583

Open
chloelbn opened this issue Sep 9, 2019 · 0 comments · May be fixed by #584
Open

Refine the error messages on saveObjects #583

chloelbn opened this issue Sep 9, 2019 · 0 comments · May be fixed by #584
Labels

Comments

@chloelbn
Copy link

chloelbn commented Sep 9, 2019

When you pass a single array instead of an array of objects to the saveObjects method, the following error is returned:
PHP Fatal error: Uncaught Algolia\AlgoliaSearch\Exceptions\MissingObjectId: All objects must have an unique objectID (like a primary key) to be valid.

The error should be changed to
PHP Fatal error: Please provide an array of objects instead of a single object. to better reflect the problem.

See https://secure.helpscout.net/conversation/950642494/173763/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant