Skip to content

Commit

Permalink
fix: 빌드 오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
kmebin committed Dec 5, 2023
1 parent 29ef195 commit 132ee3c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.springframework.http.HttpStatus;
import org.springframework.validation.FieldError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.MissingRequestValueException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;
Expand Down Expand Up @@ -114,6 +115,12 @@ protected ErrorResponse handleMethodArgumentTypeMismatchException(MethodArgument
return new ErrorResponse(message, null);
}

@ResponseStatus(HttpStatus.BAD_REQUEST)
@ExceptionHandler(MissingRequestValueException.class)
protected ErrorResponse handleMethodArgumentTypeMismatchException(MissingRequestValueException exception) {
return new ErrorResponse(exception.getMessage(), null);
}

@ExceptionHandler(MaxUploadSizeExceededException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
protected ErrorResponse handleMaxSizeException(MaxUploadSizeExceededException exception) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ void token_info_response_fail(int code) throws Exception {
.andRespond(withStatus(HttpStatusCode.valueOf(code)));

mockMvc.perform(post("/members/login/kakao/oauth")
.flashAttr("authorizationCodeResponse", authorizationCodeResponse))
.content(objectMapper.writeValueAsString(authorizationCodeResponse))
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isBadRequest());
}
}

0 comments on commit 132ee3c

Please sign in to comment.