33a3d92e by 冯轩

ADD:try catch

1 parent 30dda232
...@@ -1905,7 +1905,11 @@ class SearchGBHistoryFileView(GenericView): ...@@ -1905,7 +1905,11 @@ class SearchGBHistoryFileView(GenericView):
1905 gb_history_file_class = HILGreenBookHistoryFile if business_type in consts.HIL_SET else AFCGreenBookHistoryFile 1905 gb_history_file_class = HILGreenBookHistoryFile if business_type in consts.HIL_SET else AFCGreenBookHistoryFile
1906 ecm = ECM() 1906 ecm = ECM()
1907 response_json = ecm.search_doc_info_list(file_path, business_type) 1907 response_json = ecm.search_doc_info_list(file_path, business_type)
1908 try:
1908 data_objects = response_json['Envelope']['Body']['executeResponse']['return']['dataPackage']['DataObjects'] 1909 data_objects = response_json['Envelope']['Body']['executeResponse']['return']['dataPackage']['DataObjects']
1910 except Exception as e:
1911 self.exception_log.exception('[SearchGBHistoryFileView] [response_json parse failed] [response_json={0}] [error={1}]'.format(response_json, traceback.format_exc()))
1912 return response.ok(data=False)
1909 self.running_log.info('[SearchGBHistoryFileView] [data_objects size={0}] '.format(len(data_objects))) 1913 self.running_log.info('[SearchGBHistoryFileView] [data_objects size={0}] '.format(len(data_objects)))
1910 for data_object in data_objects: 1914 for data_object in data_objects:
1911 object_id = data_object['Identity']['ObjectId']['@id'] 1915 object_id = data_object['Identity']['ObjectId']['@id']
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!