File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
noweekend-core/core-api/src/main/kotlin/noweekend/core/api/controller/v1/request Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema
44import noweekend.core.domain.tag.BasicTag
55import noweekend.core.support.error.CoreException
66import noweekend.core.support.error.ErrorType
7+ import org.slf4j.LoggerFactory
78
89@Schema(description = " 자주하는 일정 DTO" )
910data class TagRequest (
@@ -13,6 +14,8 @@ data class TagRequest(
1314 )
1415 val scheduleTags : List <String >,
1516) {
17+ private val log = LoggerFactory .getLogger(this ::class .java)
18+
1619 fun validatedScheduleTags (): List <BasicTag > {
1720 val result = mutableListOf<BasicTag >()
1821 val invalid = mutableListOf<String >()
@@ -22,6 +25,9 @@ data class TagRequest(
2225 result.add(BasicTag .fromKorean(it.trim()))
2326 } catch (e: NoSuchElementException ) {
2427 invalid.add(it)
28+ } catch (e: Exception ) {
29+ log.error(e.printStackTrace().toString())
30+ throw CoreException (ErrorType .DEFAULT_ERROR )
2531 }
2632 }
2733 if (invalid.isNotEmpty()) throw CoreException (ErrorType .INVALID_SCHEDULE_TAG )
You can’t perform that action at this time.
0 commit comments