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

[Feature/#10] 상위 목표 리스트 조회 기능 구현 #15

Merged
merged 23 commits into from
Aug 15, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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 @@ -33,14 +33,7 @@ public ResponseEntity<ErrorResponse> handleValidException(MethodArgumentNotValid
ErrorCode errorCode = ErrorCode.INVALID_INPUT_VALUE;
BindingResult bindingResult = e.getBindingResult();

StringBuilder stringBuilder = new StringBuilder();
for (FieldError fieldError : bindingResult.getFieldErrors()) {
stringBuilder.append(fieldError.getField()).append(":");
stringBuilder.append(fieldError.getDefaultMessage());
stringBuilder.append(", ");
}

final ErrorResponse response = ErrorResponse.of(errorCode, e.getBindingResult());
final ErrorResponse response = ErrorResponse.of(errorCode, bindingResult);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 조금만 간결화 했습니다~

return new ResponseEntity<>(response, HTTP_STATUS_OK);
}

Expand Down
Loading