CCDV-F practice › Applications & Integration · Question 43 of 92

Applications & Integration

A response comes back with stop_reason of 'refusal'. What should production code do?

Show answer and explanation

Answer: B — Handle it explicitly and log it, rather than treating it as a completed answer

Each stop_reason branch exists because a distinct production failure lives there. A refusal is an explicit, loggable outcome — blindly parsing it or retrying the same request unchanged both ignore what actually happened.