mirror of
https://github.com/TeamPiped/Piped-Backend
synced 2025-09-05 21:11:05 +02:00
Add null-check for logging exceptions.
This commit is contained in:
parent
b8c6fbf9b1
commit
6641ddc043
@ -289,7 +289,7 @@ public class ServerLauncher extends MultithreadedHttpServerLauncher {
|
|||||||
|
|
||||||
private @NotNull HttpResponse getErrorResponse(Exception e) {
|
private @NotNull HttpResponse getErrorResponse(Exception e) {
|
||||||
|
|
||||||
if (e instanceof ExecutionException)
|
if (e.getCause() != null && e instanceof ExecutionException)
|
||||||
e = (Exception) e.getCause();
|
e = (Exception) e.getCause();
|
||||||
|
|
||||||
if (!(e instanceof AgeRestrictedContentException || e instanceof ContentNotAvailableException))
|
if (!(e instanceof AgeRestrictedContentException || e instanceof ContentNotAvailableException))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user