납품 폴더 조회 api 추가 #168

Merged
teddy merged 1 commits from feat/training_260324 into develop 2026-03-24 17:30:19 +09:00

View File

@@ -525,12 +525,13 @@ public class DatasetService {
// 존재 + 디렉토리 체크
if (!dir.exists() || !dir.isDirectory()) {
throw new RuntimeException("Invalid path");
throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST, "잘못된 경로입니다.");
}
// 권한 없을때
if (!dir.canRead()) {
throw new RuntimeException("Permission denied");
throw new CustomApiException(
ApiResponseCode.FORBIDDEN.getId(), HttpStatus.FORBIDDEN, "디렉토리에 접근할 권한이 없습니다.");
}
String canonicalPath = dir.getCanonicalPath();