From 9df58971ea5a9cae2c1a80e105eeea257b41d5d3 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 10 Aug 2020 15:01:48 +0200 Subject: [PATCH] Improve SASL error message --- lib/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client.js b/lib/client.js index 4c093e9..cb37a51 100644 --- a/lib/client.js +++ b/lib/client.js @@ -49,7 +49,7 @@ export default class Client extends EventTarget { }); this.ws.addEventListener("error", () => { - this.dispatchEvent(new CustomEvent("error", { detail: "Connection Error" })); + this.dispatchEvent(new CustomEvent("error", { detail: "Connection error" })); }); } @@ -120,7 +120,7 @@ export default class Client extends EventTarget { case irc.ERR_SASLTOOLONG: case irc.ERR_SASLABORTED: case irc.ERR_SASLALREADY: - this.dispatchEvent(new CustomEvent("error", { detail: "SASL error: " + msg })); + this.dispatchEvent(new CustomEvent("error", { detail: "SASL error (" + msg.command + "): " + msg.params[1] })); this.close(); break; case "PING":