diegogub / aranGO

Golang driver for ArangoDB
Apache License 2.0
125 stars 31 forks source link

unique constraint violated error not returned on save #49

Open samlotti opened 6 years ago

samlotti commented 6 years ago

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 commented 6 years ago

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

samlotti commented 6 years ago

@diegogub ArangoDB 3.3.17