Skip to content

fix(bibtex): surface lookup failures instead of returning no matches#6

Merged
hanxiao merged 1 commit into
mainfrom
fix/bibtex-surface-failures
Jun 2, 2026
Merged

fix(bibtex): surface lookup failures instead of returning no matches#6
hanxiao merged 1 commit into
mainfrom
fix/bibtex-surface-failures

Conversation

@hanxiao

@hanxiao hanxiao commented Jun 2, 2026

Copy link
Copy Markdown
Member

Problem

search_bibtex queries DBLP and Semantic Scholar directly. Each helper caught every error (timeout, network, API outage) and returned [], so a total outage was indistinguishable from a genuine "no matches" - the command reported no results on what was actually a failed lookup.

Fix

  • _search_dblp and _search_semantic_scholar record the failure into an errors list instead of silently swallowing it.
  • One provider failing still returns the other's hits.
  • Only when every source failed and nothing was found does search_bibtex raise bibtex lookup failed (...). A real empty result (sources reachable, no hits) still returns an empty list.

Mirrors the same fix in jina-ai/MCP#26.

search_bibtex wrapped each source (DBLP, Semantic Scholar) in 'except Exception: return []', so a
network outage or API error was indistinguishable from a genuine 'no matches'. Record each source's
error and, when every source failed and there are no results, raise so the CLI reports a clear
error + non-zero exit (the bibtex command already maps exceptions via handle_http_error).
@hanxiao hanxiao merged commit f77dfb8 into main Jun 2, 2026
1 check passed
@hanxiao hanxiao deleted the fix/bibtex-surface-failures branch June 2, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant