Add Tag creation usecase
This commit is contained in:
parent
1861bdfe74
commit
d6efbf757f
3 changed files with 13 additions and 2 deletions
8
3-Domain/src/main/java/exeptions/URLIsNotReachable.java
Normal file
8
3-Domain/src/main/java/exeptions/URLIsNotReachable.java
Normal file
|
@ -0,0 +1,8 @@
|
|||
package exeptions;
|
||||
|
||||
public class URLIsNotReachable extends RuntimeException {
|
||||
|
||||
public URLIsNotReachable(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
|
Reference in a new issue