From 0b174f2e5018f3a32cf8c60412f7375bbef402c9 Mon Sep 17 00:00:00 2001 From: Freya Arbjerg Date: Tue, 14 Nov 2023 13:20:34 +0100 Subject: [PATCH 1/2] Fix misleading error message --- .../src/main/java/lavalink/server/player/PlayerRestHandler.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt b/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt index 18355d8a8..18e1e3a7b 100644 --- a/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt +++ b/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt @@ -76,9 +76,9 @@ class PlayerRestHandler( } playerUpdate.voice.ifPresent { - //discord sometimes send a partial server update missing the endpoint, which can be ignored. + // Discord sometimes sends a partial voice server update missing the endpoint, which can be ignored. if (it.endpoint.isEmpty() || it.token.isEmpty() || it.sessionId.isEmpty()) { - throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Partial voice state update: $it") + throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Partial voice server update: $it") } } From 69d73b058edeb688bbd7a600a7c30a881765fcb6 Mon Sep 17 00:00:00 2001 From: Freya Arbjerg Date: Tue, 14 Nov 2023 13:32:24 +0100 Subject: [PATCH 2/2] Use "Lavalink voice state" in error message --- .../src/main/java/lavalink/server/player/PlayerRestHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt b/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt index 18e1e3a7b..6bd043499 100644 --- a/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt +++ b/LavalinkServer/src/main/java/lavalink/server/player/PlayerRestHandler.kt @@ -78,7 +78,7 @@ class PlayerRestHandler( playerUpdate.voice.ifPresent { // Discord sometimes sends a partial voice server update missing the endpoint, which can be ignored. if (it.endpoint.isEmpty() || it.token.isEmpty() || it.sessionId.isEmpty()) { - throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Partial voice server update: $it") + throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Partial Lavalink voice state: $it") } }