Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/core/task/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3257,9 +3257,10 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
// Determine cancellation reason
const cancelReason: ClineApiReqCancelReason = this.abort ? "user_cancelled" : "streaming_failed"

const rawErrorMessage = error.message ?? JSON.stringify(serializeError(error), null, 2)
const streamingFailedMessage = this.abort
? undefined
: (error.message ?? JSON.stringify(serializeError(error), null, 2))
: `${t("common:interruption.streamTerminatedByProvider")}: ${rawErrorMessage}`

// Clean up partial state
await abortStream(cancelReason, streamingFailedMessage)
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@
},
"interruption": {
"responseInterruptedByUser": "Response interrupted by user",
"responseInterruptedByApiError": "Response interrupted by API error"
"responseInterruptedByApiError": "Response interrupted by API error",
"streamTerminatedByProvider": "Stream terminated by provider"
},
"storage": {
"prompt_custom_path": "Enter custom conversation history storage path, leave empty to use default location",
Expand Down
Loading