Skip to content

fix: report real credential status from get_setup_instructions#8

Merged
jaakla merged 1 commit into
mainfrom
fix/setup-instructions-status
Jun 1, 2026
Merged

fix: report real credential status from get_setup_instructions#8
jaakla merged 1 commit into
mainfrom
fix/setup-instructions-status

Conversation

@jaakla

@jaakla jaakla commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Problem

get_setup_instructions always returned the setup payload containing "error": "Merit API credentials are not configured." — even when credentials were configured and every other tool worked. The handler unconditionally called build_setup_payload(), which hardcodes that error string regardless of config state.

Fix

get_setup_instructions now reflects actual state:

  • Credentials missing: unchanged — mode: "setup" with the error and instructions.
  • Credentials present: new mode: "configured" payload (credentials_present: true, active country, no misleading error field). API key/id are not leaked.

The per-tool fallback path (build_tool_handlerbuild_setup_payload) is untouched, so tools called without credentials still return setup guidance with blocked_tool/blocked_api_method.

Tests

Added two tests covering both states. Full suite: 29 passed.

🤖 Generated with Claude Code

get_setup_instructions always returned the setup payload with
"Merit API credentials are not configured.", even when credentials
were set and other tools worked. Now it returns a "configured"
status payload when credentials are present, and only the setup
guidance when they are missing.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@jaakla jaakla merged commit be1eff5 into main Jun 1, 2026
4 checks passed
@jaakla jaakla deleted the fix/setup-instructions-status branch June 1, 2026 21:01
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