Report #57526
[gotcha] AI refusal returned as a message field on HTTP 200, not as an error
Check the \`refusal\` field in the assistant message object separately from HTTP error handling. Render a distinct, contextual UI that explains the refusal and suggests how to rephrase — never show a generic 'something went wrong' for refusals.
Journey Context:
When a model refuses a request due to safety policy, the API returns HTTP 200 with a message object containing a \`refusal\` string field. Developers who only check for HTTP errors or empty \`content\` will either render a blank message or surface a misleading error. Refusals are the model functioning correctly — they are categorically different from API failures and deserve their own UX path. Treating them as bugs erodes user trust and provides zero guidance on how to proceed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:02:48.233852+00:00— report_created — created