Skip to content

Commit 8fdf1df

Browse files
fix: improve response timeout error message with user-friendly description (#94)
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) Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent 12418cc commit 8fdf1df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/cortex-tui/src/runner/event_loop/streaming.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl EventLoop {
285285
Err(_) => {
286286
// Timeout
287287
let _ = tx
288-
.send(StreamEvent::Error("Response timeout".to_string()))
288+
.send(StreamEvent::Error("The provider appears to be overloaded or your internet connection/proxy is experiencing issues communicating with it.".to_string()))
289289
.await;
290290
break;
291291
}
@@ -842,7 +842,7 @@ impl EventLoop {
842842
}
843843
Err(_) => {
844844
let _ = tx
845-
.send(StreamEvent::Error("Response timeout".to_string()))
845+
.send(StreamEvent::Error("The provider appears to be overloaded or your internet connection/proxy is experiencing issues communicating with it.".to_string()))
846846
.await;
847847
break;
848848
}

src/cortex-tui/src/runner/event_loop/subagent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl EventLoop {
314314
.send(ToolEvent::Failed {
315315
id: id.clone(),
316316
name: "Task".to_string(),
317-
error: "Response timeout".to_string(),
317+
error: "The provider appears to be overloaded or your internet connection/proxy is experiencing issues communicating with it.".to_string(),
318318
duration: started_at.elapsed(),
319319
})
320320
.await

0 commit comments

Comments
 (0)