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

[ALL] api/guests/maps/{mapId}/spaces/availability API 에서 datetime 포맷 이상하게 들어오는 이슈 #949

Open
sakjung opened this issue Mar 14, 2023 · 0 comments
Labels

Comments

@sakjung
Copy link
Collaborator

sakjung commented Mar 14, 2023

버그 기능

  • startDateTime endDateTime 시간 포맷 잘못 요청 오는 이슈 (e.g. T20:00:00+09:00)
  • 앞에 날짜가 안붙어 오는 경우가 있음
  • 서버측에서 MethodArgumentTypeMismatchException 발생

FE

  • 올바른 포맷으로 보내도록 수정

BE

  • 잘못된 포맷으로 오더라도 ControllerAdvice invalidFormatHandler method 타도록 (400 Bad Request) 수정

log sample

2023-03-14 22:22:06.778 |  WARN | http-nio-8080-exec-4 |  a9b1ace80783 | [ControllerAdvice:114] - Failed to convert value of type 'java.lang.String' to required type 'java.time.ZonedDateTime'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@org.springframework.web.bind.annotation.RequestParam @org.springframework.format.annotation.DateTimeFormat java.time.ZonedDateTime] for value 'T20:00:00+09:00'; nested exception is java.lang.IllegalArgumentException: Parse attempt failed for value [T20:00:00+09:00] (traceId: a9b1ace80783) 
2023-03-14 22:22:06.779 | ERROR | http-nio-8080-exec-4 |  a9b1ace80783 | [RequestLoggingFilter:98] - [5ms] [500][HTTP METHOD: GET] [PATH INFO: /api/guests/maps/3/spaces/availability] [REQUEST HEADER: x-forwarded-for:223.62.8.46, host:127.0.0.1:8080, connection:close, sec-ch-ua:"Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110", sec-ch-ua-mobile:?1, authorization:Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmZWIuZGFpbkBnbWFpbC5jb20iLCJpYXQiOjE2Nzg4MDAwNzAsImV4cCI6MTY3ODg4NjQ3MH0.M05EQqUpSaKMMCOClRkoGM07kr79RODPLSu8MkAU8-Q, user-agent:Mozilla/5.0 (Linux; Android 12; SM-N976N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Mobile Safari/537.36, sec-ch-ua-platform:"Android", accept:*/*, origin:https://zzimkkong.com, sec-fetch-site:same-site, sec-fetch-mode:cors, sec-fetch-dest:empty, referer:https://zzimkkong.com/, accept-encoding:gzip, deflate, br, accept-language:en-US,en;q=0.9,ko-KR;q=0.8,ko;q=0.7] [REQUEST PARAMETERS: {startDateTime=T20:00:00+09:00, endDateTime=T21:00:00+09:00}] [REMOTE ADDRESS: 223.62.8.46] 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant