Reliability · interview question
A bug appears around failure policy. What is the strongest first debugging move?
Multiple choiceHardchapter-5-curatedpremiumreliabilityfailure-policy
def should_retry(status_code: int) -> bool:
return status_code in {429, 502, 503, 504}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. A one-size-fits-all failure policy either hides permanent errors or overloads already unstable systems.
Test yourself on Reliability
A free test with instant, explained results. No account needed.
More Reliability questions
- If you wrote a test around failure policy, what should the test prove first?
- Which boundary choice best fits failure policy in a maintainable Python system?
- Which option describes the most likely pitfall around failure policy?
- What is the clearest sign that code around failure policy should be refactored?
- A teammate submits shaky failure policy code. Which review comment is the strongest?
- Which explanation would sound strongest in an interview when discussing failure policy?