@karpeleslab/klbfw 0.2.13 → 0.2.14
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/package.json +1 -1
- package/rest.js +6 -0
package/package.json
CHANGED
package/rest.js
CHANGED
|
@@ -204,6 +204,12 @@ const restSSE = (name, method, params, context) => {
|
|
|
204
204
|
withCredentials: true
|
|
205
205
|
});
|
|
206
206
|
|
|
207
|
+
// Handle errors and server-side closures
|
|
208
|
+
eventSource.onerror = (error) => {
|
|
209
|
+
console.error('EventSource error:', error);
|
|
210
|
+
eventSource.close();
|
|
211
|
+
};
|
|
212
|
+
|
|
207
213
|
return eventSource;
|
|
208
214
|
};
|
|
209
215
|
|