From 6e9282c3501c2deba5126a5622701a365f16a007 Mon Sep 17 00:00:00 2001 From: bjkim Date: Fri, 24 Oct 2025 14:35:42 +0900 Subject: [PATCH] =?UTF-8?q?[MODIFY]=20MinioAttachmentService=20=EC=98=88?= =?UTF-8?q?=EC=99=B8=20=EC=B2=98=EB=A6=AC=20=EB=A1=9C=EC=A7=81=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0=20=EB=B0=8F=20=EC=98=A4=EB=A5=98=20=EB=A9=94=EC=8B=9C?= =?UTF-8?q?=EC=A7=80=20=EC=B6=9C=EB=A0=A5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/DynamicMinioAttachmentService.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/kr/re/etri/autoflow/service/DynamicMinioAttachmentService.java b/src/main/java/kr/re/etri/autoflow/service/DynamicMinioAttachmentService.java index 2eb3823..787a53f 100644 --- a/src/main/java/kr/re/etri/autoflow/service/DynamicMinioAttachmentService.java +++ b/src/main/java/kr/re/etri/autoflow/service/DynamicMinioAttachmentService.java @@ -111,11 +111,29 @@ public class DynamicMinioAttachmentService { GetObjectArgs.builder().bucket(bucketName).object(objectName).build() )) { return is.readAllBytes(); + } catch (io.minio.errors.ErrorResponseException e) { + // statusCode() 제거, 필요한 정보만 출력 + throw new RuntimeException( + "MinIO 서버가 요청을 거부했습니다: " + objectName + + ", 코드=" + e.errorResponse().code() + + ", 메시지=" + e.errorResponse().message() + + ", 요청ID=" + e.errorResponse().requestId() + + ", 호스트ID=" + e.errorResponse().hostId(), e); + } catch (io.minio.errors.ServerException e) { + throw new RuntimeException("MinIO 서버 오류 발생: " + objectName, e); + } catch (io.minio.errors.InsufficientDataException e) { + throw new RuntimeException("MinIO 데이터 부족 오류: " + objectName, e); + } catch (io.minio.errors.InternalException e) { + throw new RuntimeException("MinIO 내부 오류: " + objectName, e); + } catch (io.minio.errors.InvalidResponseException e) { + throw new RuntimeException("MinIO 응답 파싱 실패: " + objectName, e); } catch (Exception e) { throw new RuntimeException("MinIO 파일 다운로드 실패: " + objectName, e); } } + + /** YAML 텍스트 읽기 */ public String readYamlText(String objectName, String type) { MinioClient client = getClientByType(type);