Skip to content

Commit 9782867

Browse files
Potential fix for code scanning alert no. 9: Information exposure through an exception (#535)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 5cf7bec commit 9782867

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hookreceiver/hookreceiver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ def clear_events():
295295
db.commit()
296296
return {'status': 'success'}, 200
297297
except Exception as e:
298-
return {'status': 'error', 'message': str(e)}, 500
298+
app.logger.exception(f"Error clearing events: {e}")
299+
return {'status': 'error', 'message': 'An internal error occurred'}, 500
299300

300301

301302
@app.route('/stream')

0 commit comments

Comments
 (0)