diff --git a/mens-api/src/main/java/kr/xit/biz/mbl/service/MobilePageService.java b/mens-api/src/main/java/kr/xit/biz/mbl/service/MobilePageService.java index 24e6d3a..05a0807 100644 --- a/mens-api/src/main/java/kr/xit/biz/mbl/service/MobilePageService.java +++ b/mens-api/src/main/java/kr/xit/biz/mbl/service/MobilePageService.java @@ -85,7 +85,7 @@ public class MobilePageService extends AbstractService implements IMobilePageSer .build() ); if(!res.isSuccess()){ - throw BizRuntimeException.create(res.getMessage()); + throw BizRuntimeException.create(res.getCode(), res.getMessage()); } return mobilePageManage.getMobilePageCn(); } @@ -125,9 +125,8 @@ public class MobilePageService extends AbstractService implements IMobilePageSer .build() ); if(!res.isSuccess()){ - throw BizRuntimeException.create(res.getMessage()); + throw BizRuntimeException.create(res.getCode(), res.getMessage()); } - return mobilePageManage.getMobilePageCn(); } diff --git a/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java b/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java index 0dc9cc7..157b313 100644 --- a/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java +++ b/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java @@ -73,6 +73,9 @@ public class MobilePageController { }else{ mav.addObject("details", service.findKkotalkReadyAndMblPage(reqDTO));; } + } catch (BizRuntimeException e){ + mav.addObject("errCode", e.getErrorCode()); + mav.addObject("errMsg", e.getMessage()); }catch (Exception e){ mav.addObject("errCode", e.getMessage()); mav.addObject("errMsg", e.getMessage()); @@ -150,7 +153,10 @@ public class MobilePageController { } mav.addObject("details", mblCnts); - }catch (Exception e){ + } catch (BizRuntimeException e){ + mav.addObject("errCode", e.getErrorCode()); + mav.addObject("errMsg", e.getMessage()); + } catch (Exception e){ mav.addObject("errCode", e.getMessage()); mav.addObject("errMsg", e.getMessage()); }