You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ ~ curl -X POST http://localhost:5001/search/azure \
-H "Content-Type: application/json" \
-d '{"query": "cat"}'
{
"details": "",
"error": "Azure index search failed.",
"trace": "Traceback (most recent call last):\n File \"/home/vscode/.local/lib/python3.11/site-packages/index_search/__init__.py\", line 33, in transform\n value = dpath.get(source_dict, path)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/vscode/.local/lib/python3.11/site-packages/dpath/__init__.py\", line 189, in get\n raise KeyError(glob)\nKeyError: '/@search.highlights/content/0'\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/home/vscode/.local/lib/python3.11/site-packages/flask/app.py\", line 870, in full_dispatch_request\n rv = self.dispatch_request()\n ^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/vscode/.local/lib/python3.11/site-packages/flask/app.py\", line 855, in dispatch_request\n return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/workspaces/finesse-backend/app/blueprints/search.py\", line 68, in search_azure\n results = search(query, client, search_params, transform_map)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/vscode/.local/lib/python3.11/site-packages/index_search/__init__.py\", line 54, in search\n transformed_results = [\n ^\n File \"/home/vscode/.local/lib/python3.11/site-packages/index_search/__init__.py\", line 55, in <listcomp>\n transform(result, result_transform_map) for result in search_results\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/vscode/.local/lib/python3.11/site-packages/index_search/__init__.py\", line 36, in transform\n raise DataTransformError from e\nindex_search.DataTransformError\n"
}
Title:
Azure Index Search Endpoint Error Handling
Description:
Configuration:
FINESSE_BACKEND_AZURE_SEARCH_TRANSFORM_MAP={"id": "/id", "title": "/title", "score": "/@search.score", "url": "/url", "content": "/@search.highlights/content/0", "last_updated": "/last_updated"}
Tasks:
dpath.get
function calls.Acceptance Criteria:
cat
search should not result in a KeyError.The text was updated successfully, but these errors were encountered: