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"]'
414
+
>>> exc_crud.res isNone# using only in case of *_many.
415
+
True
416
+
417
+
# 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 lines were inserted.
428
+
<tarantool.crud.CrudResult object at 0x11a56f310>
429
+
>>> exc_crud.res.rows
430
+
[[1800, 100, 'Mike'], [3800, 100, 'Bob']]
431
+
>>> exc_crud.errs # some of the lines were not inserted.
432
+
[<tarantool.crud.CrudError object at 0x11a56e9e0>, <tarantool.crud.CrudError object at 0x11a56f490>]
433
+
>>> exc_crud.errs[0].str
434
+
'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"]'
435
+
>>> exc_crud.errs[1].str
436
+
'InsertManyError: Failed to flatten object: FlattenError: Object is specified in bad format: FlattenError: Unknown field "second_name" is specified'
437
+
>>> exc_crud.args
438
+
(<tarantool.crud.CrudResult object at 0x11a56f310>, [<tarantool.crud.CrudError object at 0x11a56e9e0>, <tarantool.crud.CrudError object at 0x11a56f490>])
(33, "Procedure 'crud.insert' is not defined. Ensure that you're calling crud.router and user have enough grants")
457
+
>>> exc_db.code
458
+
33
459
+
>>> exc_db.message
460
+
"Procedure 'crud.insert' is not defined. Ensure that you're calling crud.router and user have enough grants"
461
+
>>> exc_db.extra_info
462
+
BoxError(type='ClientError', file='/tmp/tarantool-20221003-6335-edruh3/tarantool-2.10.3/src/box/lua/call.c', line=112, message="Procedure 'crud.insert' is not defined. Ensure that you're calling crud.router and user have enough grants", errno=0, errcode=33, fields=None, prev=None)
463
+
464
+
Using :class:`~tarantool.Connection.crud_select`and :class:`~tarantool.Connection.crud_unflatten_rows`:
0 commit comments