From 9ba3df0ce7bf8514dae010fd899b6cd537bb3746 Mon Sep 17 00:00:00 2001 From: Rene Cannao Date: Fri, 23 Jan 2026 13:20:49 +0000 Subject: [PATCH] Address AI code review feedback from PR #5318 - Fix Makefile: Use $(CXXFLAGS) directly for consistency with build philosophy - Fix MySQL_Catalog: Return proper error JSON instead of empty array on missing query --- Makefile | 2 +- lib/MySQL_Catalog.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dc21ee351..4a54e321e 100644 --- a/Makefile +++ b/Makefile @@ -155,7 +155,7 @@ build_src_debug: $(if $(LEGACY_BUILD),build_src_debug_legacy,build_src_debug_def # RAG ingester (PoC) .PHONY: rag_ingest rag_ingest: build_deps - cd RAG_POC && ${MAKE} CC=${CC} CXX=${CXX} OPTZ="${O2} -ggdb" CXXFLAGS="${O2} -ggdb" + cd RAG_POC && ${MAKE} CC=${CC} CXX=${CXX} CXXFLAGS="${CXXFLAGS}" .PHONY: rag_ingest_clean rag_ingest_clean: diff --git a/lib/MySQL_Catalog.cpp b/lib/MySQL_Catalog.cpp index 5db2b0504..35c5e2681 100644 --- a/lib/MySQL_Catalog.cpp +++ b/lib/MySQL_Catalog.cpp @@ -290,7 +290,8 @@ std::string MySQL_Catalog::search( // FTS5 search requires a query if (query.empty()) { proxy_error("Catalog search requires a query parameter\n"); - return "[]"; + nlohmann::json error_result = {{"error", "Catalog search requires a query parameter"}}; + return error_result.dump(); } // Helper lambda to escape single quotes for SQLite SQL literals