Skip to content

fix(provider): improve local provider connection error messages#22178

Closed
tobias-weiss-ai-xr wants to merge 1 commit intoanomalyco:devfrom
tobias-weiss-ai-xr:feature/better-provider-errors
Closed

fix(provider): improve local provider connection error messages#22178
tobias-weiss-ai-xr wants to merge 1 commit intoanomalyco:devfrom
tobias-weiss-ai-xr:feature/better-provider-errors

Conversation

@tobias-weiss-ai-xr
Copy link
Copy Markdown

@tobias-weiss-ai-xr tobias-weiss-ai-xr commented Apr 12, 2026

Closes #22190

Issue for this PR Closes # ### Type of change - [x] Bug fix ### What does this PR do? When a local provider (like Ollama or LM Studio) is unreachable, the error is a raw ECONNREFUSED that gives no hint about what is wrong. Users do not know if it is their server, their config, or a network issue. This adds provider-specific error context for connection failures to localhost/private IPs. It detects local provider URLs and appends actionable messages like suggesting to check if the server is running or if the port is correct. ### How did you verify your code works? - All 19 packages typecheck clean - Tested with local providers going offline ### Checklist - [x] I have tested my changes locally - [x] I have not included unrelated changes in this PR

Detect ECONNREFUSED/ETIMEDOUT/ENOTFOUND errors to localhost URLs and
append provider-specific hints. Ollama, LiteLLM, LM Studio, and LocalAI
all get actionable messages like 'Is Ollama running? Start it with:
ollama serve'.
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Apr 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 12, 2026

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • "What does this PR do?" section is empty or only contains placeholder text. Please describe your changes.
  • No "Type of change" checkbox is checked. Please select at least one.
  • No issue referenced. Please add Closes #<number> linking to the relevant issue.
  • "How did you verify your code works?" section is empty. Please explain how you tested.
  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Apr 12, 2026
@github-actions github-actions bot closed this Apr 12, 2026
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.

Local provider connection errors are unclear and unhelpful

1 participant