tarantool / crud

Easy assess to data stored in vshard cluster
BSD 2-Clause "Simplified" License
40 stars 14 forks source link

Bad error handling #431

Open vanyarock01 opened 2 months ago

vanyarock01 commented 2 months ago

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.