Skip to content

fix(ask): show the server's error instead of blaming the connection - #72

Merged
Rl0007 merged 1 commit into
mainfrom
fix/ask-server-error-message
Oct 6, 2026
Merged

Rl0007 merged 1 commit into
mainfrom
fix/ask-server-error-message

Conversation

@Rl0007

@Rl0007 Rl0007 commented Oct 5, 2026

Copy link
Copy Markdown
Contributor
  1. When the model call failed on Ask (for example, the provider account was out of credits), the answer said "the connection dropped", so people checked their network. Nothing was written to the Error Log.
  2. Ask now says the answer couldn't be generated and why (out of credits, or the model call failed). The connection message only shows for a real network drop, and the failure is logged in the Error Log.

You can visit /wikify/ask to see it.

Fixes #51

Before

After

Verification
  • Added two tests in wikify/tests/test_rag_api.py (a 402 credits error and a generic error). Only the answer (LLM) call is stubbed. Both failed on main because the raw exception escaped, and both pass on this branch. Each test checks the clean message and one Error Log row.
  • Full suite on a devbox: 476 passed, 11 skipped, 0 failed (baseline 474/11/0 plus the 2 new tests).
  • E2E on a devbox, with an invalid model key so the answer call fails: before, "The answer was lost in transit"; after, "The answer couldn't be generated: the language model call failed". The Error Log row "Wikify: could not generate the answer" was written.
  • Reviewers: the Vue review approved. The backend review suggested log_error(defer_insert=True) instead of the commit. I kept the commit because the deferred queue only flushes when the scheduler runs. That is why the original 500 never reached the Error Log. ask writes nothing else before this point.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@Rl0007
Rl0007 merged commit f7e3a78 into main Oct 6, 2026
3 checks passed
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.

Ask says the connection dropped when the server failed

1 participant