[#20] 도메인별 예외 분리 #21

Merged
pricelees merged 37 commits from refactor/#20 into main 2025-07-24 02:48:53 +00:00
3 changed files with 13 additions and 2 deletions
Showing only changes of commit 3551458086 - Show all commits

View File

@ -4,5 +4,5 @@ import roomescape.common.exception.RoomException
class AuthException(
override val errorCode: AuthErrorCode,
override val message: String? = errorCode.message
override val message: String = errorCode.message
) : RoomException(errorCode, message)

View File

@ -1,6 +1,7 @@
package roomescape.common.dto.response
import com.fasterxml.jackson.annotation.JsonInclude
import roomescape.common.exception.ErrorCode
import roomescape.common.exception.ErrorType
@JsonInclude(JsonInclude.Include.NON_NULL)
@ -12,3 +13,13 @@ data class CommonErrorResponse(
val errorType: ErrorType,
val message: String? = errorType.description
)
data class CommonErrorResponseV2(
val code: String,
val message: String
) {
constructor(errorCode: ErrorCode, message: String = errorCode.message) : this(
code = errorCode.errorCode,
message = message
)
}

View File

@ -2,5 +2,5 @@ package roomescape.common.exception
open class RoomException(
open val errorCode: ErrorCode,
override val message: String? = errorCode.message
override val message: String = errorCode.message
) : RuntimeException(message)