Skip to content

Commit

Permalink
fix : 에러 응답 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
KkomSang committed May 23, 2024
1 parent ace8834 commit 12c6261
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import com.hobak.happinessql.domain.activity.dto.*;
import com.hobak.happinessql.domain.user.application.UserFindService;
import com.hobak.happinessql.domain.user.domain.User;
import com.hobak.happinessql.global.exception.GeneralException;
import com.hobak.happinessql.global.response.Code;
import com.hobak.happinessql.global.response.DataResponseDto;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand Down Expand Up @@ -54,7 +56,7 @@ public DataResponseDto<ActivityResponseDto> deleteActivity(@PathVariable Long ac
return DataResponseDto.of(responseDto, "활동을 성공적으로 삭제했습니다.");
}
else {
return DataResponseDto.of(null, "본인이 추가하지 않은 활동은 삭제가 불가합니다.");
throw new GeneralException(Code.INTERNAL_ERROR,"본인이 추가하지 않은 활동은 삭제가 불가합니다.");
}

}
Expand All @@ -68,7 +70,7 @@ public DataResponseDto<ActivityUpdateResponseDto> updateActivity(@PathVariable L
return DataResponseDto.of(responseDto,"활동을 성공적으로 수정했습니다.");
}
else {
return DataResponseDto.of(null, "본인이 추가하지 않은 활동은 수정이 불가합니다.");
throw new GeneralException(Code.INTERNAL_ERROR,"본인이 추가하지 않은 활동은 수정이 불가합니다.");
}
}

Expand Down

0 comments on commit 12c6261

Please sign in to comment.