Code review comment: Who will handle the exception？return failed response?

Code before review:
public TBeginRemoteTxnResponse beginRemoteTxn(TBeginRemoteTxnRequest request) throws TException {
TBeginRemoteTxnResponse response = new TBeginRemoteTxnResponse();
Catalog catalog = Catalog.getCurrentCatalog();
if (!catalog.isMaster()) {
try {
TNetworkAddress addr = masterAddr();
LOG.info("beginRemoteTxn as follower, forward it to master. Label: {}, master: {}",
request.getLabel(), addr.toString());
FrontendService.Client client = ClientPool.frontendPool.borrowObject(addr, 1000);
response = client.beginRemoteTxn(request);
ClientPool.frontendPool.returnObject(addr, client);
return response;
} catch (Exception e) {
LOG.warn("create thrift client failed during beginRemoteTxn, label: {}, exception: {}", request.getLabel(), e);
throw new TException(e.getMessage());
}
}
Database db = catalog.getDb(request.getDb_id());
if (db == null) {
TStatus status = new TStatus(TStatusCode.NOT_FOUND);
status.setError_msgs(Lists.newArrayList("db not exist"));
response.setStatus(status);
return response;
}
long txnId;
try {
txnId = Catalog.getCurrentGlobalTransactionMgr().beginTransaction(db.getId(),
request.getTable_ids(), request.getLabel(),
new TxnCoordinator(TxnSourceType.FE, FrontendOptions.getLocalHostAddress()),
LoadJobSourceType.valueOf(request.getSource_type()), request.getTimeout_second());
} catch (Exception e) {
LOG.info("begin remote txn error, label {}, msg {}", request.getLabel(), e.getStackTrace());
TStatus status = new TStatus(TStatusCode.INTERNAL_ERROR);
status.setError_msgs(Lists.newArrayList(e.getMessage()));
response.setStatus(status);
return response;
}
TStatus status = new TStatus(TStatusCode.OK);
response.setStatus(status);
response.setTxn_id(txnId);
response.setTxn_label(request.getLabel());
LOG.info("begin remote txn, label: {}, txn_id: {}", request.getLabel(), txnId);
return response;
}

Line under review: throw new TException(e.getMessage());

Code after addressing the review:
public TBeginRemoteTxnResponse beginRemoteTxn(TBeginRemoteTxnRequest request) throws TException {
TBeginRemoteTxnResponse response = new TBeginRemoteTxnResponse();
Catalog catalog = Catalog.getCurrentCatalog();
if (!catalog.isMaster()) {
TNetworkAddress addr = masterAddr();
FrontendService.Client client = null;
try {
LOG.info("beginRemoteTxn as follower, forward it to master. Label: {}, master: {}",
request.getLabel(), addr.toString());
client = ClientPool.frontendPool.borrowObject(addr, 1000);
response = client.beginRemoteTxn(request);
ClientPool.frontendPool.returnObject(addr, client);
} catch (Exception e) {
LOG.warn("create thrift client failed during beginRemoteTxn, label: {}, exception: {}", request.getLabel(), e);
TStatus status = new TStatus(TStatusCode.INTERNAL_ERROR);
status.setError_msgs(Lists.newArrayList("forward request to fe master failed"));
response.setStatus(status);
ClientPool.frontendPool.invalidateObject(addr, client);
} finally {
return response;
}
}
Database db = catalog.getDb(request.getDb_id());
if (db == null) {
TStatus status = new TStatus(TStatusCode.NOT_FOUND);
status.setError_msgs(Lists.newArrayList("db not exist"));
response.setStatus(status);
return response;
}
long txnId;
try {
txnId = Catalog.getCurrentGlobalTransactionMgr().beginTransaction(db.getId(),
request.getTable_ids(), request.getLabel(),
new TxnCoordinator(TxnSourceType.FE, FrontendOptions.getLocalHostAddress()),
LoadJobSourceType.valueOf(request.getSource_type()), request.getTimeout_second());
} catch (Exception e) {
LOG.info("begin remote txn error, label {}, msg {}", request.getLabel(), e.getStackTrace());
TStatus status = new TStatus(TStatusCode.INTERNAL_ERROR);
status.setError_msgs(Lists.newArrayList(e.getMessage()));
response.setStatus(status);
return response;
}
TStatus status = new TStatus(TStatusCode.OK);
response.setStatus(status);
response.setTxn_id(txnId);
response.setTxn_label(request.getLabel());
LOG.info("begin remote txn, label: {}, txn_id: {}", request.getLabel(), txnId);
return response;
}