From 8b55b75aa09581b0727fefd74539ec2d7044f703 Mon Sep 17 00:00:00 2001 From: YugyeomGhim Date: Wed, 6 Nov 2024 22:13:12 +0900 Subject: [PATCH] =?UTF-8?q?Chore:=20recording=20=EB=94=94=EB=B2=84?= =?UTF-8?q?=EA=B9=85=EC=9D=84=20=EC=9C=84=ED=95=B4=20exception=20message?= =?UTF-8?q?=20=ED=98=95=ED=83=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/notai/common/exception/type/BadRequestException.java | 3 +++ .../java/notai/recording/application/RecordingService.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/notai/common/exception/type/BadRequestException.java b/src/main/java/notai/common/exception/type/BadRequestException.java index 55e0cbc..fc07ea0 100644 --- a/src/main/java/notai/common/exception/type/BadRequestException.java +++ b/src/main/java/notai/common/exception/type/BadRequestException.java @@ -9,4 +9,7 @@ public class BadRequestException extends ApplicationException { public BadRequestException(ErrorMessages message) { super(message, 400); } + public BadRequestException(String message) { + super(message, 400); + } } diff --git a/src/main/java/notai/recording/application/RecordingService.java b/src/main/java/notai/recording/application/RecordingService.java index d09e819..4140908 100644 --- a/src/main/java/notai/recording/application/RecordingService.java +++ b/src/main/java/notai/recording/application/RecordingService.java @@ -60,7 +60,7 @@ public RecordingSaveResult saveRecording(RecordingSaveCommand command) { return RecordingSaveResult.of(savedRecording.getId(), foundDocument.getId(), savedRecording.getCreatedAt()); } catch (IllegalArgumentException e) { - throw new BadRequestException(INVALID_AUDIO_ENCODING); + throw new BadRequestException(INVALID_AUDIO_ENCODING + " : " + e.getMessage()); } catch (IOException e) { throw new InternalServerErrorException(FILE_SAVE_ERROR); // TODO: 재시도 로직 추가? }