crud icon indicating copy to clipboard operation
crud copied to clipboard

Bad error handling

Open vanyarock01 opened this issue 1 year ago • 0 comments
trafficstars

I tried to call insert with crud with unexisted bucket_id and i get follow error:

Failed to get router replicaset: nil

I found error code: https://github.com/tarantool/crud/blob/master/crud/common/call.lua#L201

I think the route method returns table without .err key. For check it i print this value before:

err={"bucket_id":1712661972,"code":9,"type":"ShardingError","message":"Bucket 1712661972 cannot be found. Is rebalancing in progress?","name":"NO_ROUTE_TO_BUCKET"}

I think the error handling needs to be improved.

vanyarock01 avatar Apr 09 '24 11:04 vanyarock01