@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/rest.js +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karpeleslab/klbfw",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Frontend Framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
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