@pikku/fetch 0.12.3 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## 0.12.4
|
|
2
|
+
|
|
3
|
+
### Patch Changes
|
|
4
|
+
|
|
5
|
+
- ade6f0b: `subscribeToSSE`: call `onError` when the stream closes cleanly without the caller having called `close()`. Previously a server-side connection drop (or any clean EOF before the terminal event) exited the read loop silently, leaving the caller's `runPhase` stuck at `'running'` indefinitely with no way to recover.
|
|
6
|
+
|
|
1
7
|
## 0.12.3
|
|
2
8
|
|
|
3
9
|
### Patch Changes
|
|
@@ -202,6 +202,9 @@ export class CorePikkuFetch {
|
|
|
202
202
|
handler(parsed);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
+
// Clean EOF before caller called close() = unexpected stream termination.
|
|
206
|
+
if (!closed)
|
|
207
|
+
throw new Error('SSE stream closed unexpectedly');
|
|
205
208
|
}
|
|
206
209
|
catch (err) {
|
|
207
210
|
if (!closed)
|
package/package.json
CHANGED
package/src/core-pikku-fetch.ts
CHANGED
|
@@ -254,6 +254,8 @@ export class CorePikkuFetch {
|
|
|
254
254
|
handler(parsed)
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
+
// Clean EOF before caller called close() = unexpected stream termination.
|
|
258
|
+
if (!closed) throw new Error('SSE stream closed unexpectedly')
|
|
257
259
|
} catch (err) {
|
|
258
260
|
if (!closed) onError?.(err)
|
|
259
261
|
}
|