Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def api_template(template_key):
"mitre_info": mitre_info,
})
except ValueError as e:
return jsonify({"success": False, "error": str(e)}), 404
# Do not expose internal error details to the client
logging.warning("ValueError in api_template for key %s: %s", template_key, e)
return jsonify({"success": False, "error": "Template not found."}), 404
except Exception as e:
logging.exception("Unexpected error in api_template for key %s", template_key)
return jsonify({"success": False, "error": "An internal error occurred while loading the template."}), 400
Expand Down
Loading