corrent error handling for SELECT invalid DB index