File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
common/src/main/java/dev/lavalink/youtube/track Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -97,13 +97,18 @@ public void process(LocalAudioTrackExecutor localExecutor) throws Exception {
9797
9898 if (lastException != null ) {
9999 if (lastException instanceof FriendlyException ) {
100+ if (!"YouTube WebM streams are currently not supported." .equals (lastException .getMessage ())) {
101+ // Rethrow certain FriendlyExceptions as suspicious to ensure LavaPlayer logs them.
102+ throw new FriendlyException (lastException .getMessage (), Severity .SUSPICIOUS , lastException .getCause ());
103+ }
104+
100105 throw lastException ;
101106 }
102107
103108 throw ExceptionTools .toRuntimeException (lastException );
104109 }
105110 } catch (CannotBeLoaded e ) {
106- throw ExceptionTools .wrapUnfriendlyExceptions ("This video is unavailable" , Severity .COMMON , e .getCause ());
111+ throw ExceptionTools .wrapUnfriendlyExceptions ("This video is unavailable" , Severity .SUSPICIOUS , e .getCause ());
107112 }
108113 }
109114
@@ -188,7 +193,7 @@ private FormatWithUrl loadBestFormatWithUrl(@NotNull HttpInterface httpInterface
188193 TrackFormats formats = client .loadFormats (sourceManager , httpInterface , getIdentifier ());
189194
190195 if (formats == null ) {
191- throw new FriendlyException ("This video cannot be played" , Severity .COMMON , null );
196+ throw new FriendlyException ("This video cannot be played" , Severity .SUSPICIOUS , null );
192197 }
193198
194199 StreamFormat format = formats .getBestFormat ();
You can’t perform that action at this time.
0 commit comments