Improve SASL error message

This commit is contained in:
Simon Ser 2020-08-10 15:01:48 +02:00
parent c6c3c66fc4
commit 9df58971ea
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -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":