Starlette 최신 상수로 교체: HTTP_422_UNPROCESSABLE_ENTITY → _CONTENT #27

Closed
opened 2026-04-22 02:52:00 +09:00 by xhh · 0 comments
Owner

Starlette 최신 버전에서 HTTP_422_UNPROCESSABLE_ENTITY 이름이 HTTP_422_UNPROCESSABLE_CONTENT 로 재명명됐다. CI 실행 로그에 관련 DeprecationWarning 이 한 번 출력됨.

현재 예전 이름도 alias 로 동작하지만 미래 호환을 위해 교체.

교체 대상

grep -rn "HTTP_422_UNPROCESSABLE_ENTITY" src/

현재 확인: src/financial_platform/api/routers/reports.py (stock 타입 ticker 필수 검증).

교체

# before
from fastapi import status
raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, ...)
# after
raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, ...)

기능 변화 0, 기존 테스트 그대로 통과 기대.

Starlette 최신 버전에서 `HTTP_422_UNPROCESSABLE_ENTITY` 이름이 `HTTP_422_UNPROCESSABLE_CONTENT` 로 재명명됐다. CI 실행 로그에 관련 DeprecationWarning 이 한 번 출력됨. 현재 예전 이름도 alias 로 동작하지만 미래 호환을 위해 교체. ## 교체 대상 ```bash grep -rn "HTTP_422_UNPROCESSABLE_ENTITY" src/ ``` 현재 확인: `src/financial_platform/api/routers/reports.py` (stock 타입 ticker 필수 검증). ## 교체 ```python # before from fastapi import status raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, ...) # after raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, ...) ``` 기능 변화 0, 기존 테스트 그대로 통과 기대.
xhh closed this issue 2026-04-22 03:39:06 +09:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
xhh/financial-data-platform#27
No description provided.