Catch exception from Thrift, and use main template in master_client.