Context
PR #1208 adds unit coverage for Typesense multi_search per-result errors and bridge helper coverage for inaccessible #h filters, but it does not add an end-to-end bridge regression because handle_bridge_search currently depends on concrete AppState.search plumbing.
Task
Add regression coverage for HTTP bridge /query search behavior when Typesense returns a search API error.
Desired assertion
A /query request with a NIP-50 search filter should return Ok(Json([])) / HTTP 200 empty results when the search backend returns SearchError::Api { status: 400, .. }, instead of surfacing HTTP 500.
Possible approaches
- Extract a trait/interface around the search service so bridge tests can stub
state.search.
- Or use HTTP-level mocking for the Typesense client and drive the bridge path with a real
SearchService.
Related
Context
PR #1208 adds unit coverage for Typesense
multi_searchper-result errors and bridge helper coverage for inaccessible#hfilters, but it does not add an end-to-end bridge regression becausehandle_bridge_searchcurrently depends on concreteAppState.searchplumbing.Task
Add regression coverage for HTTP bridge
/querysearch behavior when Typesense returns a search API error.Desired assertion
A
/queryrequest with a NIP-50searchfilter should returnOk(Json([]))/ HTTP 200 empty results when the search backend returnsSearchError::Api { status: 400, .. }, instead of surfacing HTTP 500.Possible approaches
state.search.SearchService.Related
2bc6e66f...