File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/main/java/com/blockguard/server/domain/analysis/domain/enums Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11package com .blockguard .server .domain .analysis .domain .enums ;
22
3- import com .blockguard .server .global .common .codes .ErrorCode ;
4- import com .blockguard .server .global .exception .BusinessExceptionHandler ;
53import lombok .Getter ;
64
75import java .util .Arrays ;
@@ -26,7 +24,8 @@ public enum FraudType {
2624 CRYPTOCURRENCY_SCAM ("가상화폐 사기형" ),
2725 STOCK_INVESTMENT_SCAM ("주식투자 사기형" ),
2826 IPO_SCAM ("청약 공모주 사기형" ),
29- FALSE_PAYMENT_SCAM ("허위결제 사기형" );
27+ FALSE_PAYMENT_SCAM ("허위결제 사기형" ),
28+ UNKNOWN ("알 수 없음" );
3029
3130 private final String korName ;
3231
@@ -43,13 +42,13 @@ private static String squashSpaces(String s) {
4342
4443 public static FraudType fromKoreanName (String kr ) {
4544 if (kr == null ) {
46- throw new BusinessExceptionHandler ( ErrorCode . AI_SERVER_ERROR ) ;
45+ return UNKNOWN ;
4746 }
4847 final String target = squashSpaces (kr .trim ());
4948
5049 return Arrays .stream (values ())
5150 .filter (e -> squashSpaces (e .korName ).equals (target ))
5251 .findFirst ()
53- .orElseThrow (() -> new BusinessExceptionHandler ( ErrorCode . AI_SERVER_ERROR ) );
52+ .orElse ( UNKNOWN );
5453 }
5554}
You can’t perform that action at this time.
0 commit comments