You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'InsertError: Failed to insert: Duplicate key exists in unique index "primary_index" in space "tester" with old tuple - [3500, 300, "Rob"] and new tuple - [3500, 300, "Rob"]'
406
+
>>> exc_crud.res isNone# using only in case of *_many.
407
+
True
408
+
409
+
# In case of batch operation (*_many), CrudModuleError contains both result and errors:
CrudModuleError(<tarantool.crud.CrudResult object at 0x11a56f310>, [<tarantool.crud.CrudError object at 0x11a56e9e0>, <tarantool.crud.CrudError object at 0x11a56f490>])
417
+
>>> exc_crud.res # some of the rows were inserted.
418
+
<tarantool.crud.CrudResult object at 0x11a56f310>
419
+
>>> exc_crud.res.rows
420
+
[[1800, 100, 'Mike'], [3800, 100, 'Bob']]
421
+
>>> exc_crud.errs # some of the rows were not inserted.
422
+
[<tarantool.crud.CrudError object at 0x11a56e9e0>, <tarantool.crud.CrudError object at 0x11a56f490>]
423
+
>>> exc_crud.errs[0].str
424
+
'CallError: Failed for 56d9c861-a8ac-459c-9715-09094ebb94a7: Function returned an error: Duplicate key exists in unique index "primary_index" in space "tester" with old tuple - [1, 100, "Mike"] and new tuple - [1, 100, "Rob"]'
425
+
>>> exc_crud.errs[1].str
426
+
'InsertManyError: Failed to flatten object: FlattenError: Object is specified in bad format: FlattenError: Unknown field "second_name" is specified'
0 commit comments