Skip to content

Commit a8abe0e

Browse files
authored
avoid information exposure through exception
1 parent 6a7e634 commit a8abe0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

LowCodeLLM/src/app.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def get_workflow():
3232
except Exception as e:
3333
app.logger.error(
3434
'failed to get_workflow, msg:%s, request data:%s' % (str(e), request.json))
35-
return {'errmsg': str(e)}, 500
35+
return {'errmsg': 'internal errors'}, 500
3636

3737
@app.route('/api/extend_workflow', methods=['POST'])
3838
@cross_origin()
@@ -47,7 +47,7 @@ def extend_workflow():
4747
except Exception as e:
4848
app.logger.error(
4949
'failed to extend_workflow, msg:%s, request data:%s' % (str(e), request.json))
50-
return {'errmsg': str(e)}, 500
50+
return {'errmsg': 'internal errors'}, 500
5151

5252
@app.route('/api/execute', methods=['POST'])
5353
@cross_origin()
@@ -63,4 +63,4 @@ def execute():
6363
except Exception as e:
6464
app.logger.error(
6565
'failed to execute, msg:%s, request data:%s' % (str(e), request.json))
66-
return {'errmsg': str(e)}, 500
66+
return {'errmsg': 'internal errors'}, 500

0 commit comments

Comments
 (0)