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

unique constraint violated error not returned on save #49

Open
samlotti opened this issue Oct 15, 2018 · 2 comments
Open

unique constraint violated error not returned on save #49

samlotti opened this issue Oct 15, 2018 · 2 comments

Comments

@samlotti
Copy link

error is nill on result of save when 409 returned from arangodb

Case needed in
func (col *Collection) Save(doc interface{}) error {
...
case 409:
return errors.New( "unique constraint violated" )

To reproduce, add a unique index on a collection.
Call to add a document multiple times, the error is returned by Arango but not by the save function.

I believe this should be added to other functions as well.

@diegogub
Copy link
Owner

@samlotti , will fix it. Which version of arangodb are you using?

@samlotti
Copy link
Author

@diegogub ArangoDB 3.3.17

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

No branches or pull requests

2 participants