aranGO icon indicating copy to clipboard operation
aranGO copied to clipboard

unique constraint violated error not returned on save

Open samlotti opened this issue 7 years ago • 2 comments

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.

samlotti avatar Oct 15 '18 20:10 samlotti

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

diegogub avatar Oct 20 '18 11:10 diegogub

@diegogub ArangoDB 3.3.17

samlotti avatar Oct 20 '18 11:10 samlotti