Commit d1b27a9
committed
fix(sdk): drop duplicate onError on SSE auth-error path
`SSEStreamSubscription.connectStream` invokes `onError` twice for 401/403
responses: first in the `!response.ok` branch where the auth ApiError is
constructed (so consumers see the original failure status/headers), then
again in the catch block's `isTriggerRealtimeAuthError` arm before
terminating the stream. Drop the second call — the early one already
notified the consumer; the catch block's job is just to route the error
to `controller.error` so retry doesn't fire.
Spotted by Devin on PR 3173.1 parent 5629d2b commit d1b27a9
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
435 | 437 | | |
436 | 438 | | |
437 | 439 | | |
| |||
0 commit comments