Skip to content

Commit 8b97c16

Browse files
continue[bot]Continue
andcommitted
fix: add missing cancelStream call and return for non-retryable errors
- Add cancelStream() call before showing error dialog for non-retryable errors - Add return statement to prevent loop continuation after handling non-retryable error Co-authored-by: nate <[email protected]> Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
1 parent 2fccf3a commit 8b97c16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎gui/src/redux/thunks/streamThunkWrapper.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const streamThunkWrapper = createAsyncThunk<
5151
await new Promise((resolve) => setTimeout(resolve, delayMs));
5252
await dispatch(cancelStream());
5353
} else {
54+
await dispatch(cancelStream());
5455
dispatch(setDialogMessage(<StreamErrorDialog error={e} />));
5556
dispatch(setShowDialog(true));
5657

@@ -62,6 +63,7 @@ export const streamThunkWrapper = createAsyncThunk<
6263
};
6364

6465
posthog.capture("gui_stream_error", errorData);
66+
return;
6567
}
6668
}
6769
}

0 commit comments

Comments
 (0)