-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π :: μλΉμ€ μμ μ μμ μ€ μ¬νμ κ²μ¦ λ‘μ§ #284
π :: μλΉμ€ μμ μ μμ μ€ μ¬νμ κ²μ¦ λ‘μ§ #284
Conversation
@@ -33,6 +36,9 @@ class DelegateOwnerService( | |||
val delegateUser = userRepository.findByIdOrNull(delegateUserId) | |||
?: throw UserNotFoundException() | |||
|
|||
if (delegateUser.userRole.any { it.userRoleType != UserRoleType.ROLE_STUDENT }) | |||
throw NotValidDelegateUserException() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ NotValid보λ€λ InvalidλΌλ λ¨μ΄λ₯Ό μ¬μ©νλ©΄ μ’μ κ² κ°λ€μ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e7d4bff
μμ νμμ΅λλ€
import com.msg.gauth.global.exception.ErrorCode | ||
import com.msg.gauth.global.exception.exceptions.BasicException | ||
|
||
class NotValidDelegateUserException: BasicException(ErrorCode.BAD_REQUEST) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ErrorCodeμ BAD_REQUESTλ₯Ό μ¬μ©ν기보λ€λ μ νν λ©μμ§λ₯Ό λ¨κΈΈ μ μλκ±Έ ErrorCode enumμ μλ‘ μΆκ°ν΄μ£ΌμΈμ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fab0e47
μΆκ°νμμ΅λλ€ νμΈλΆνλλ €μ
π‘ κ°μ
μλΉμ€ μμ μ μμνλ μ€μ μμμκ° μ¬νμμΈμ§ κ²μ¦νλ λ‘μ§μ μΆκ°νμ΅λλ€.
π μμ λ΄μ©
π λ³κ²½μ¬ν
πββοΈ μ§λ¬Έμ¬ν
βοΈ μ¬μ©λ²
πΈ κΈ°ν