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"]'
410
+
>>> exc_crud.res isNone# using only in case of *_many.
411
+
True
412
+
413
+
# 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>])
>>> exc_crud.res # some of the rows were inserted.
424
+
<tarantool.crud.CrudResult object at 0x11a56f310>
425
+
>>> exc_crud.res.rows
426
+
[[1800, 100, 'Mike'], [3800, 100, 'Bob']]
427
+
>>> exc_crud.errs # some of the rows were not inserted.
428
+
[<tarantool.crud.CrudError object at 0x11a56e9e0>, <tarantool.crud.CrudError object at 0x11a56f490>]
429
+
>>> exc_crud.errs[0].str
430
+
'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"]'
431
+
>>> exc_crud.errs[1].str
432
+
'InsertManyError: Failed to flatten object: FlattenError: Object is specified in bad format: FlattenError: Unknown field "second_name" is specified'
433
+
>>> exc_crud.args
434
+
(<tarantool.crud.CrudResult object at 0x11a56f310>, [<tarantool.crud.CrudError object at 0x11a56e9e0>, <tarantool.crud.CrudError object at 0x11a56f490>])
0 commit comments