MCPcopy Index your code
hub / github.com/microsoft/data-formulator / knowledge_delete

Function knowledge_delete

py-src/data_formulator/routes/knowledge.py:118–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116
117@knowledge_bp.route("/delete", methods=["POST"])
118def knowledge_delete():
119 data = request.get_json(silent=True) or {}
120 category = _require_json_field(data, "category")
121 path = _require_json_field(data, "path")
122
123 store = _get_store()
124 try:
125 store.delete(category, path)
126 except ValueError as exc:
127 raise AppError(ErrorCode.INVALID_REQUEST, str(exc)) from exc
128 except FileNotFoundError:
129 raise AppError(ErrorCode.TABLE_NOT_FOUND, "Knowledge file not found")
130
131 return json_ok(None)
132
133
134# ── search ────────────────────────────────────────────────────────────────

Callers

nothing calls this directly

Calls 5

AppErrorClass · 0.90
json_okFunction · 0.90
_require_json_fieldFunction · 0.85
_get_storeFunction · 0.85
deleteMethod · 0.45

Tested by

no test coverage detected