Perform better exception handling for n1kv client.