Skip to content

Commit ecca676

Browse files
committed
[BOOK-201] feat: apis - 독서기록상세조회 exception 정의 (#67)
1 parent 2ef17c7 commit ecca676

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.yapp.apis.readingrecord.exception
2+
3+
import org.springframework.http.HttpStatus
4+
import org.yapp.globalutils.exception.BaseErrorCode
5+
6+
enum class ReadingRecordErrorCode(
7+
private val status: HttpStatus,
8+
private val code: String,
9+
private val message: String
10+
) : BaseErrorCode {
11+
READING_RECORD_NOT_FOUND(HttpStatus.NOT_FOUND, "READING_RECORD_001", "독서 기록을 찾을 수 없습니다.");
12+
13+
override fun getHttpStatus(): HttpStatus = status
14+
override fun getCode(): String = code
15+
override fun getMessage(): String = message
16+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.yapp.apis.readingrecord.exception
2+
3+
import org.yapp.globalutils.exception.CommonException
4+
5+
class ReadingRecordNotFoundException(
6+
errorCode: ReadingRecordErrorCode,
7+
message: String? = null
8+
) : CommonException(errorCode, message)

0 commit comments

Comments
 (0)