Skip to content

Commit

Permalink
refactor: Roadmap에서 발생한 예외는 RoaadmapException을 던지도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Ohjintaek committed Dec 22, 2023
1 parent 7085619 commit 3c0ba17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package co.kirikiri.roadmap.persistence.dto;

import co.kirikiri.service.exception.BadRequestException;
import co.kirikiri.roadmap.domain.exception.RoadmapException;

public record RoadmapSearchTagName(
String value
Expand All @@ -20,7 +20,7 @@ private String removeBlank(final String name) {

private void validateLength(final String name) {
if (name.length() < MIN_LENGTH) {
throw new BadRequestException(
throw new RoadmapException(
String.format("검색어는 최소 %d자부터 가능합니다.", MIN_LENGTH));
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package co.kirikiri.roadmap.persistence.dto;

import co.kirikiri.service.exception.BadRequestException;
import co.kirikiri.roadmap.domain.exception.RoadmapException;

public record RoadmapSearchTitle(
String value
Expand All @@ -20,7 +20,7 @@ private String removeBlank(final String title) {

private void validateLength(final String title) {
if (title.length() < MIN_LENGTH) {
throw new BadRequestException(
throw new RoadmapException(
String.format("검색어는 최소 %d자부터 가능합니다.", MIN_LENGTH));
}
}
Expand Down

0 comments on commit 3c0ba17

Please sign in to comment.