Skip to content
Sharp

Service Design · interview question

A bug appears around dto mapping. What is the strongest first debugging move?

Multiple choiceHardchapter-12-curatedpremiumservice-designdto-mapping
python
def to_order_summary(payload: dict[str, object]) -> dict[str, object]:
    return {"id": payload["order_id"], "status": payload["state"]}
Choose one answer
Answer and explanation

Correct answer

D. Trace one concrete example, inspect the state transitions, and compare them to the intended rule before rewriting anything.

Why

That approach is reliable because it creates evidence. Skipping DTOs can make the service layer speak in partner-specific language forever.

Test yourself on Service Design

A free test with instant, explained results. No account needed.

Start free test
All Service Design questions →