시작하기무료로 시작하기

Add Validation

The db_routes.py endpoint works, but what happens if someone requests an artist that doesn't exist? Currently it returns an empty array with no explanation. We need proper error handling. Your directory has been provisioned with the Music Analytics API including db_routes.py that implements the albums endpoint without Pydantic validation or 404 handling — you can view it here: music-analytics-api-with-db-routed/db_routes.py.

Your task is to add Pydantic validation and return a 404 when the artist doesn't exist or has no albums.

이 연습은 강의의 일부입니다

Software Development with Claude Code

강의 보기

연습 안내

  • Start Claude Code with claude.
  • Ask Claude to add Pydantic validation to db_routes.py and return a 404 error when the artist doesn't exist or has no albums.
  • When done, type /exit to exit Claude Code.

실습형 인터랙티브 연습문제

이론을 실습으로 바꾸는 인터랙티브 연습 중 하나를 만나보세요

연습 시작