-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from Central-MakeUs/fix/popcornDuplicate
[fix]팝콘 오류 분기처리
- Loading branch information
Showing
7 changed files
with
73 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
Domain/src/main/java/com/example/domains/popcornUser/exceptions/DuplicatePopcorn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.example.domains.popcornUser.exceptions; | ||
|
||
import com.example.domains.recommendedPopcorn.exceptions.NoMovieSearched; | ||
import com.example.domains.recommendedPopcorn.exceptions.RecommendedErrorCode; | ||
import com.example.error.BaseErrorException; | ||
|
||
public class DuplicatePopcorn extends BaseErrorException { | ||
public static final BaseErrorException EXCEPTION = new DuplicatePopcorn(); | ||
|
||
private DuplicatePopcorn () { | ||
super(PopcornUserErrorCode.DUPLICATE_POPCORN_REVIEW); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Domain/src/main/java/com/example/domains/popcornUser/exceptions/NoPopcornReview.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.example.domains.popcornUser.exceptions; | ||
|
||
import com.example.error.BaseErrorException; | ||
|
||
public class NoPopcornReview extends BaseErrorException { | ||
public static final BaseErrorException EXCEPTION = new NoPopcornReview(); | ||
|
||
private NoPopcornReview () { | ||
super(PopcornUserErrorCode.NO_POPCORN_REVIEW); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
Domain/src/main/java/com/example/domains/popcornUser/exceptions/PopcornUserErrorCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.example.domains.popcornUser.exceptions; | ||
|
||
import com.example.dto.ErrorReason; | ||
import com.example.error.BaseErrorCode; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum PopcornUserErrorCode implements BaseErrorCode { | ||
DUPLICATE_POPCORN_REVIEW(409,"POPCORN_REVIEW_409", "중복된 리뷰가 존재합니다"), | ||
NO_POPCORN_REVIEW(404,"POPCORN_REVIEW_404" ,"팝콘이 존재하지 않습니다" ); | ||
private int status; | ||
private String code; | ||
private String reason; | ||
|
||
@Override | ||
public ErrorReason getErrorReason() { | ||
return ErrorReason.of(status, code, reason); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters