From 5388b71fc9cc5f408d36a2697b15da8a52359ae1 Mon Sep 17 00:00:00 2001 From: jaganathanraja <46275424+jaganathanraja@users.noreply.github.com> Date: Mon, 14 Oct 2024 08:25:30 +0530 Subject: [PATCH 1/3] Stream Error not handled in client --- src/websocket.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/websocket.js b/src/websocket.js index 43280a08..e77917f7 100644 --- a/src/websocket.js +++ b/src/websocket.js @@ -121,6 +121,8 @@ class Websocket { errorString += ' - ' + text; } log.error(errorString); + // Call error handler + Strophe.error(errorString); // close the connection on stream_error this._conn._changeConnectStatus(connectstatus, condition); From beef88f406da1aeb4afbd153d168b1db6ffb1d88 Mon Sep 17 00:00:00 2001 From: jaganathanraja <46275424+jaganathanraja@users.noreply.github.com> Date: Mon, 14 Oct 2024 08:32:09 +0530 Subject: [PATCH 2/3] The error is returned to the Strophe error method, allowing it to be handled. --- src/websocket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/websocket.js b/src/websocket.js index e77917f7..b05a1809 100644 --- a/src/websocket.js +++ b/src/websocket.js @@ -121,7 +121,7 @@ class Websocket { errorString += ' - ' + text; } log.error(errorString); - // Call error handler + // The error is returned to the Strophe error method, allowing it to be handled. Strophe.error(errorString); // close the connection on stream_error From 836effd21ed96af297ed0b778d2364b7b4d01012 Mon Sep 17 00:00:00 2001 From: jaganathanraja <46275424+jaganathanraja@users.noreply.github.com> Date: Mon, 14 Oct 2024 08:45:21 +0530 Subject: [PATCH 3/3] The error is sent to the Strophe error method, allowing it to be handle --- src/websocket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/websocket.js b/src/websocket.js index b05a1809..6abbeb14 100644 --- a/src/websocket.js +++ b/src/websocket.js @@ -121,7 +121,7 @@ class Websocket { errorString += ' - ' + text; } log.error(errorString); - // The error is returned to the Strophe error method, allowing it to be handled. + // The stream error is sent to the Strophe error method, allowing it to be handled. Strophe.error(errorString); // close the connection on stream_error