diff --git a/src/main/java/me/kavin/piped/ServerLauncher.java b/src/main/java/me/kavin/piped/ServerLauncher.java index d3be310..8f96933 100644 --- a/src/main/java/me/kavin/piped/ServerLauncher.java +++ b/src/main/java/me/kavin/piped/ServerLauncher.java @@ -289,7 +289,7 @@ public class ServerLauncher extends MultithreadedHttpServerLauncher { private @NotNull HttpResponse getErrorResponse(Exception e) { - if (e instanceof ExecutionException) + if (e.getCause() != null && e instanceof ExecutionException) e = (Exception) e.getCause(); if (!(e instanceof AgeRestrictedContentException || e instanceof ContentNotAvailableException))