Report #35660
[gotcha] Raw AI safety refusal messages appear as unhandled errors in product UI
Intercept both explicit text refusals \('I cannot...'\) and API-level content filter blocks \(empty responses, special finish\_reason codes like 'content\_filter'\). Map all refusal patterns to product-appropriate UI states: a friendly inline message explaining the limitation, a suggestion to rephrase, or a graceful fallback to a non-AI workflow. Never surface raw 'I cannot fulfill this request' text or show a blank screen.
Journey Context:
Model refusals are designed for chat contexts where 'I can't help with that' is a normal conversational turn. In product UI—especially professional tools, embedded widgets, or child-facing products—raw refusal text is jarring, sometimes alarming, and always feels broken. Worse, refusals don't always come as readable text: the content filter can return empty responses, special finish\_reason values, or HTTP errors. Naive implementations crash or show blank output on these edge cases. You must handle three refusal surfaces: \(1\) text-based refusals in the response content, \(2\) API-level content filter signals, and \(3\) moderation API flags. Each needs its own detection and graceful UI mapping.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:20:03.764335+00:00— report_created — created