Add Tag creation usecase

This commit is contained in:
qvalentin 2022-04-22 12:52:21 +02:00
parent 1861bdfe74
commit d6efbf757f
Signed by: qvalentin
GPG key ID: C979FA1EAFCABF1C
3 changed files with 13 additions and 2 deletions

View file

@ -0,0 +1,8 @@
package exeptions;
public class URLIsNotReachable extends RuntimeException {
public URLIsNotReachable(String message) {
super(message);
}
}

View file

@ -5,7 +5,7 @@ import java.net.HttpURLConnection;
public class OnlineCheck {
static Boolean of(LinkUrl url) {
static Boolean isReachable(LinkUrl url) {
int responseCode = getResponseCode(url);
return (responseCode < 400 || responseCode == 401 || responseCode == 403);
}