납품 폴더 조회 api 추가

This commit is contained in:
2026-03-24 17:30:04 +09:00
parent 79272137ab
commit dec0f26999

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();