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
CrudModuleError(0, '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"]')
'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
+
407
+
# In case of batch operation (*_many), CrudModuleManyError exception contains both result and errors (if there is a problem with at least one row).
CrudModuleManyError(0, 'Got multiple errors, see errors_list')
415
+
>>> exc_crud.success_list # some of the rows were inserted.
416
+
<tarantool.crud.CrudResult object at 0x11a56f310>
417
+
>>> exc_crud.success_list.rows
418
+
[[1, 100, 'Bob'], [2, 100, 'Rob']]
419
+
>>> exc_crud.errors_list # some of the rows were not inserted.
420
+
[<tarantool.crud.CrudError object at 0x11a56e9e0>, <tarantool.crud.CrudError object at 0x11a56f490>]
421
+
>>> exc_crud.errors_list[0].str
422
+
'CallError: Failed for 037adb3a-b9e3-4f78-a6d1-9f0cdb6cbefc: Function returned an error: Duplicate key exists in unique index "primary_index" in space "tester" with old tuple - [3500, 300, "Rob"] and new tuple - [3500, 100, "Mike"]'
423
+
>>> exc_crud.errors_list[1].str
424
+
'InsertManyError: Failed to flatten object: FlattenError: Object is specified in bad format: FlattenError: Unknown field "second_name" is specified'
425
+
426
+
# If there are no problems with any rows, the entire response will be contained in the res variable.
0 commit comments