Skip to content

Add bridge search regression for Typesense API errors #1210

Description

@tlongwell-block

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions