Skip to content

Commit f67db97

Browse files
committed
fix code security stuff..
1 parent f64803a commit f67db97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py-src/data_formulator/agents/agent_data_transform_v2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ def process_gpt_response(self, input_tables, messages, response):
235235
logger.info(result['content'])
236236
except Exception as e:
237237
logger.warning('Error occurred during code execution:')
238-
error_message = str(e)
238+
error_message = f"An error occurred during code execution. Error type: {type(e).__name__}"
239239
logger.warning(error_message)
240-
result = {'status': 'other error', 'code': code_str, 'content': f"Unexpected error: {error_message}"}
240+
result = {'status': 'other error', 'code': code_str, 'content': error_message}
241241
else:
242242
result = {'status': 'no transformation', 'code': "", 'content': input_tables[0]['rows']}
243243

0 commit comments

Comments
 (0)