YchKhan commited on
Commit
b7095bb
·
verified ·
1 Parent(s): d613a3b

Update static/index.html

Browse files
Files changed (1) hide show
  1. static/index.html +3 -8
static/index.html CHANGED
@@ -152,14 +152,9 @@
152
  addLog('Erreur: WebSocket fermé pendant l\'appel API');
153
  }
154
 
155
- } catch (error) {
156
- console.error('Erreur lors de l\'appel API:', error);
157
- addLog(`Erreur lors de l'appel API : ${error.message}`);
158
-
159
- // Envoyer un message d'erreur au serveur pour éviter le timeout
160
- if (ws.readyState === WebSocket.OPEN) {
161
- ws.send(`Erreur: ${error.message}`);
162
- }
163
  }
164
  };
165
 
 
152
  addLog('Erreur: WebSocket fermé pendant l\'appel API');
153
  }
154
 
155
+ } catch (parseError) {
156
+ console.error('Erreur parsing JSON:', parseError);
157
+ addLog(`Erreur parsing message: ${event.data}`);
 
 
 
 
 
158
  }
159
  };
160