Skip to content

fix(confluence): limit simple-search fallback - #1646

Open
atirna wants to merge 2 commits into
sooperset:mainfrom
atirna:fix/confluence-search-timeout-fallback
Open

fix(confluence): limit simple-search fallback#1646
atirna wants to merge 2 commits into
sooperset:mainfrom
atirna:fix/confluence-search-timeout-fallback

Conversation

@atirna

@atirna atirna commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

I limited the simple-query confluence_search fallback to HTTP 400 responses. Read timeouts and other transport failures now return after the first siteSearch request instead of starting a second search.

Testing

  • uv run pytest tests/unit/servers/test_confluence_server.py -q
  • uv run pre-commit run --files src/mcp_atlassian/servers/confluence.py tests/unit/servers/test_confluence_server.py

Fixes #1644

Comment thread src/mcp_atlassian/servers/confluence.py Outdated
cql() raises ApiValueError for a 400, which the fetcher's
handle_atlassian_api_errors wraps in RuntimeError, so the previous
HTTPError-only except never fired and the sooperset#270 fallback regressed.

Unwrap the ApiError reason when the 400 arrives as RuntimeError and
drive both carriers in the tests.
@AmirF194

AmirF194 commented Sep 4, 2026

Copy link
Copy Markdown

That matches the chain I traced. Makes sense that ApiValueError cannot be caught directly at this layer since the decorator already wraps it in RuntimeError before the tool sees it.

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.

[Bug]: confluence_search fallback catches ReadTimeout and doubles the blocking time

2 participants