Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

일부 에러 코드에 대한 응답 변경 완료 #331

Merged
merged 1 commit into from
May 5, 2024
Merged
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 @@ -65,8 +65,6 @@

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.concurrent.CompletionException;

Expand All @@ -88,9 +86,9 @@ public class GlobalExceptionHandler {
MethodArgumentTypeMismatchException.class,
IllegalAccessException.class,
})
public ApiResponse badRequestException(HttpServletResponse response, Exception e) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
return ApiResponse.failure();
public ErrorResponse badRequestException(HttpServletResponse response, Exception e) {
response.setStatus(HttpServletResponse.SC_OK);
return ErrorResponse.failure(e);
}

@ExceptionHandler({
Expand Down Expand Up @@ -126,9 +124,9 @@ public ApiResponse deniedException(HttpServletResponse response, Exception e) {
NoSuchElementException.class,
FileNotFoundException.class,
})
public ApiResponse<List<?>> notFoundException(HttpServletResponse response, Exception e) {
public ErrorResponse notFoundException(HttpServletResponse response, Exception e) {
response.setStatus(HttpServletResponse.SC_OK);
return ApiResponse.success(new ArrayList<>());
return ErrorResponse.failure(e);
}

@ExceptionHandler({
Expand Down
Loading