We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cc87e38 + 24998cf commit 1d41d50Copy full SHA for 1d41d50
application/src/main/java/org/togetherjava/tjbot/features/utils/LinkDetection.java
@@ -143,6 +143,7 @@ public static CompletableFuture<Boolean> isLinkBroken(String url) {
143
return HTTP_CLIENT.sendAsync(headRequest, HttpResponse.BodyHandlers.discarding())
144
.thenApply(response -> {
145
int status = response.statusCode();
146
+ // 2xx and 3xx are success, 4xx and 5xx are errors
147
return status >= 400;
148
})
149
.exceptionally(ignored -> true)
0 commit comments