Skip to content

fix: improve response timeout error message with user-friendly description - #94

Merged
echobt merged 2 commits into
mainfrom
fix/improve-response-timeout-error-message
Feb 4, 2026
Merged

fix: improve response timeout error message with user-friendly description#94
echobt merged 2 commits into
mainfrom
fix/improve-response-timeout-error-message

Conversation

@echobt

Copy link
Copy Markdown
Contributor

Summary

Improves the 'Response timeout' error message displayed during streaming communication failures.

Changes

Replace generic 'Response timeout' message with a more descriptive, user-friendly error message:

The provider appears to be overloaded or your internet connection/proxy is experiencing issues communicating with it.

This helps users understand potential causes when they encounter timeout errors.

Files Modified

  • src/cortex-tui/src/runner/event_loop/streaming.rs (2 occurrences)
  • src/cortex-tui/src/runner/event_loop/subagent.rs (1 occurrence)

Testing

  • Code compiles without errors (cargo check -p cortex-tui)
  • All error messages updated consistently

…ption
Replace generic 'Response timeout' message with a more descriptive error
that explains the provider may be overloaded or there's an internet
connection/proxy issue when communicating with the provider.
Updated in:
- streaming.rs (2 occurrences)
- subagent.rs (1 occurrence)
@greptile-apps

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

Improved timeout error messaging by replacing generic "Response timeout" with a descriptive message explaining potential causes (provider overload or network/proxy issues).

  • Updated error messages in streaming.rs at two timeout locations (30s chunk timeout and 60s initial connection timeout)
  • Updated error message in subagent.rs for Task tool timeout failures
  • All three occurrences now provide consistent, user-friendly guidance

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are purely cosmetic string replacements that improve user experience without altering any logic, control flow, or error handling behavior
  • No files require special attention

Important Files Changed

FilenameOverview
src/cortex-tui/src/runner/event_loop/streaming.rsUpdated timeout error message in two locations to provide clearer user guidance
src/cortex-tui/src/runner/event_loop/subagent.rsUpdated timeout error message for subagent task failures

Sequence Diagram

sequenceDiagram
participant User
participant EventLoop
participant Stream as Response Stream
participant Provider as LLM Provider
User->>EventLoop: Send message
EventLoop->>Provider: complete(request) with 60s timeout
alt Initial connection timeout
Provider--xEventLoop: Timeout after 60s
EventLoop->>User: Error: "The provider appears to be overloaded..."
else Connection successful
Provider-->>EventLoop: Stream established
loop Process stream events
EventLoop->>Stream: next() with 30s timeout
alt Chunk received
Stream-->>EventLoop: ResponseEvent (delta/done/tool_call)
EventLoop->>User: Display content
else Chunk timeout
Stream--xEventLoop: Timeout after 30s
EventLoop->>User: Error: "The provider appears to be overloaded..."
end
end
end
Loading

@greptile-appsgreptile-appsBot 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.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@echobt

Copy link
Copy Markdown
ContributorAuthor

🛡️ Security Audit Report

Status: ✅ APPROVED

Scans Performed

#ScanResult
1Hardcoded secrets✅ None found
2Unsafe patterns✅ Safe - no unsafe blocks in changes
3Injection vulnerabilities✅ None found

Analysis

The changes are security-safe:

  • All modifications are static string literals with no user input concatenation
  • No format string vulnerabilities - using .to_string() on static strings
  • No sensitive information leakage - generic user-friendly error message
  • No path traversal risks - timeout error handling only

Verification

CheckResult
Static string (no interpolation)✅ Pass
No user input in error message✅ Pass
No sensitive data exposed✅ Pass
No format string injection✅ Pass

Security audit performed by automated security-auditor agent

Resolved merge conflicts in streaming.rs by keeping the main branch structure
while applying the improved timeout error message.
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@echobt
echobt merged commit 8fdf1df into mainFeb 4, 2026
15 checks passed
Sign up for freeto 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

@echobt