Return correct error message for invalid tokens.

This commit is contained in:
Juliusz Chroboczek
2024-03-03 15:38:08 +01:00
parent 89f947df1f
commit b8f7c68338
4 changed files with 7 additions and 3 deletions
+1
View File
@@ -1426,6 +1426,7 @@ func handleClientMessage(c *webClient, m clientMessage) error {
} else if errors.As(err, &autherr) {
s = "not authorised"
time.Sleep(200 * time.Millisecond)
log.Printf("Join group: %v", err)
} else if _, ok := err.(group.UserError); ok {
s = err.Error()
} else {