From d34fdf1fdaa112ce60d0a35793a7753472242b50 Mon Sep 17 00:00:00 2001 From: nevermoregb Date: Thu, 13 Mar 2025 11:00:45 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=91=EB=8B=B5=EC=9A=A9=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=EC=84=B8=EC=8A=A4=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/company/localhost/controller/api/BoardController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/company/localhost/controller/api/BoardController.java b/src/main/java/io/company/localhost/controller/api/BoardController.java index e9a8eb7..ffec70a 100644 --- a/src/main/java/io/company/localhost/controller/api/BoardController.java +++ b/src/main/java/io/company/localhost/controller/api/BoardController.java @@ -122,7 +122,9 @@ public class BoardController { public ApiResponse getBoardDetail(@PathVariable("boardId") Long boardId) { MapDto board = boardService.selectBoardDetail(boardId); if (board == null) { - throw new NotFoundHandler("게시물 ID " + boardId + "을(를) 찾을 수 없습니다."); + //throw new NotFoundHandler("게시물 ID " + boardId + "을(를) 찾을 수 없습니다."); + String errMessage = "게시물 ID " + boardId + "을(를) 찾을 수 없습니다."; + ApiResponse.error(HttpStatus.NOT_FOUND, errMessage); } // 📌 첨부파일 목록 추가 List attachments = boardService.selectAttachments(boardId);