oppenheimer-joa / movie-API

슬.문.생 서비스를 지탱하고 있는 API 서버 입니다.
2 stars 0 forks source link

[ERROR] TMDB 모든 endPoint TMDB 404 error가 발생합니다. #53

Closed J3llyBe4n closed 1 year ago

J3llyBe4n commented 1 year ago

안녕하세요 슬.문.생 데이터수집 팀 yoda 입니다.

Airflow TMDB 수집 DAG에서 movieCode는 실제로 있지만, 원천 데이터를 제공하고있는 TMDB에 세부 information이 없는 경우가 있습니다.

에러는 다음과 같습니다.

INFO:     43.202.116.246:48440 - "GET /tmdb/movie-details?date=2023-01-27 HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 292, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 184, in __call__
    raise exc
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 162, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
    raise e
  File "/usr/local/lib/python3.8/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 276, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 66, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 273, in app
    raw_response = await run_endpoint_function(
  File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 190, in run_endpoint_function
    return await dependant.call(**values)
  File "/api/routers/load_router.py", line 158, in get_tmdb_movie_details_routes
    return load_movieDetails(date)
  File "/api/utils/load_TMDB.py", line 126, in load_movieDetails
    response.raise_for_status()  # Will raise an error if the HTTP request returned an unsuccessful status code
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.themoviedb.org/3/movie/1111621
Screen Shot 2023-09-01 at 5 09 56 PM

저희 1호기에 4004 포트를 사용하고있는 API에서 들어오는 data http Response Error 오류 제어가 없으므로 발생하는 에러가 같습니다. 따라서 다음과 같이 요구사항을 걸고, hotfix 요청 부탁드립니다. 요구사항은 아래와 같습니다.

요구사항


다음과 같은 요구사항을 기반으로 수정하여, API 서버 재 배포 요청드립니다.

@woorek @blahxblah

woorek commented 1 year ago

v1.3.3 버전에 반영하여 v1.3.3/rel 이후 버전부터는 정상적으로 작동하고 있습니다. 🙂