Skip to course content
Free FastAPI backend course

FastAPI for AI Backend Development

Module 12 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. A database session should be…

2. A database outage should return…

3. An outbound call with no explicit timeout…

4. Retries should never be applied to…

5. Queries belong…

---

Answer Key and Explanations

Check these only after attempting every question.

1. B - one per request, closed in a finally

A leak on the error path exhausts the pool slowly and surfaces under load.

2. B - 503

500 says 'unknown, our fault'; 503 tells the client to retry with backoff.

3. B - can consume every worker in turn

Several popular clients default to none, so the failure mode is a hang.

4. B - 4xx responses

The payload will not become valid on the second attempt.

5. B - in the repository layer only

The service is then testable with a dictionary, and a storage change touches one directory.

Practical Check

Apply this module to your own work: complete the module activity for *Database and External Service Boundaries*, 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.