Skip to content

Commit f10b6ea

Browse files
committed
fix(core): stop SSEStreamSubscription retrying permanent 4xx forever
1 parent 239a752 commit f10b6ea

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/core/src/v3/apiClient/runStream.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,10 @@ export class SSEStreamSubscription implements StreamSubscription {
233233
// reset the timer naturally.
234234
stallTimeoutMs?: number;
235235
// HTTP statuses that should NOT be retried — fail the stream
236-
// permanently. `404` (stream gone) and `410` (session closed)
237-
// are sensible defaults; tune per-caller for other 4xx.
236+
// permanently. Defaults cover the permanent client-error set:
237+
// `400` (bad request), `404` (stream gone), `409` (conflict),
238+
// `410` (session closed), `422` (unprocessable). Tune per-caller
239+
// for other 4xx.
238240
nonRetryableStatuses?: readonly number[];
239241
// Optional fetch override. Used by transports that need to route
240242
// the SSE connect through a custom path (proxy, custom headers,

0 commit comments

Comments
 (0)