PRODUCTION SCENARIO
Your content pipeline logs a spike of HTTP 200 responses whose content array is empty and whose stop_reason is refusal. The on-call runbook treats every stop reason other than end_turn as a transient API error and retries the same request five times.
What is the correct way to handle these responses?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: Read stop_details for the policy category and retry the request on a fallback Claude model
A refusal is a normal 200 response rather than an error: Claude declined to generate, and repeating an identical request will not change that. The stop_details object names the policy category that triggered it, and the intended recovery is to retry on a fallback model.