Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public enum ErrorResponseCode {

// 404번
USER_NOT_FOUND(HttpStatus.NOT_FOUND, "E404_001", "요청된 사용자를 찾을 수 없습니다."),
USER_IMAGE_NOT_FOUND(HttpStatus.NOT_FOUND, "E404_002", "요청한 유저 이미지를 찾을 수 없습니다."),

// 409번
USER_ALREADY_EXISTS(HttpStatus.CONFLICT, "E409_001", "이미 존재하는 사용자입니다."),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.ftm.server.domain.service;

import com.ftm.server.adapter.gateway.repository.UserImageRepository;
import com.ftm.server.common.exception.CustomException;
import com.ftm.server.common.response.enums.ErrorResponseCode;
import com.ftm.server.domain.dto.query.FindByUserIdQuery;
import com.ftm.server.entity.entities.UserImage;
import lombok.RequiredArgsConstructor;
Expand All @@ -15,6 +17,6 @@ public class UserImageService {
public UserImage queryUserImageByUserId(FindByUserIdQuery query) {
return userImageRepository
.findByUserId(query.getUserId())
.orElseThrow(() -> new RuntimeException(""));
.orElseThrow(() -> new CustomException(ErrorResponseCode.USER_IMAGE_NOT_FOUND));
}
}