Skip to content

Commit 0a75848

Browse files
Merge pull request #24 from GitTimeraider/alert-autofix-9
Potential fix for code scanning alert no. 9: Information exposure through an exception
2 parents 57b2cce + 8d2bb4a commit 0a75848

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def get_da_config():
2525
})
2626
except Exception as e:
2727
print(f"Error in GET da-config: {e}")
28-
return jsonify({'error': str(e)}), 500
28+
print(traceback.format_exc())
29+
return jsonify({'error': 'An internal error has occurred. Please try again later.'}), 500
2930

3031
@settings_bp.route('/api/da-config', methods=['POST'])
3132
@login_required

0 commit comments

Comments
 (0)