Skip to course content
Free FastAPI backend course

FastAPI for AI Backend Development

Module 08 Knowledge Check

5 questions. Pass mark 4 out of 5. Answer every question before checking the answer key below, then retry after reading the feedback.

1. Routers should be split by…

2. A service raising HTTPException

3. Domain exceptions are mapped to status codes…

4. The model provider should appear in…

5. A project structure is good when…

---

Answer Key and Explanations

Check these only after attempting every question.

1. B - resource

Everything about invoices then lives in one file.

2. B - makes the service depend on FastAPI

It can no longer be called from a worker without a web framework.

3. B - in one place in the router layer

So every endpoint translates the same exception the same way.

4. B - one client module

Otherwise the vendor's types spread through your logic.

5. B - a newcomer finds the right file unaided

Not elegance - whether 'where does X go?' has one predictable answer.

Practical Check

Apply this module to your own work: complete the module activity for *Routers, Larger Project Structure and Service Layers*, then write one sentence naming what your result shows and one naming what it does not.

Strong Answer Pattern

A strong answer names the task, the evidence used, the check performed, and the remaining limitation. It avoids "proved", "guaranteed", or "always" unless the evidence genuinely supports it.