some thrift error handling