From 2d174a5fb24d0ea382285f6821ccf461e0cf039a Mon Sep 17 00:00:00 2001 From: bbasketballer75 Date: Tue, 11 Aug 2026 17:12:00 -0400 Subject: [PATCH] fix(api): make the conclusions semantic-search validation error actionable (#960) The error raised when observer/observed are missing from a semantic-search query states the requirement but not where the values go, so callers can't tell whether they belong at the top level or inside `filters`. Point at the `filters` object explicitly, show a minimal well-formed payload, and note that both the bare and `_id`-suffixed key spellings are accepted (the code already reads either). Co-authored-by: hermes --- src/routers/conclusions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routers/conclusions.py b/src/routers/conclusions.py index 3a25a5d7..eeed2723 100644 --- a/src/routers/conclusions.py +++ b/src/routers/conclusions.py @@ -110,7 +110,10 @@ async def query_conclusions( if not observer or not observed: raise ValidationException( - "observer and observed must be specified for semantic search" + "observer and observed must be specified for semantic search. " + "Pass them inside the 'filters' object, e.g. " + '{"query": "...", "filters": {"observer": "alice", "observed": "bob"}}. ' + "Both 'observer'/'observer_id' and 'observed'/'observed_id' are accepted." ) with embedding_call_purpose(