Skip to main content

AI draft refused

typehttps://docs.frem.sh/reference/api/errors/ai-draft-invalid
HTTP status422 Unprocessable Entity

What it means

The pattern your AI provider proposed failed the checks every custom secret pattern must pass (RE2 syntax, length and complexity limits, no empty or broad match). The response’s candidate holds it. Nothing was saved.

What to do

Fix the candidate by hand and save it after a dry run, or describe the format more precisely and draft again. See Draft a pattern with AI.

Response shape

All fremforge API errors are RFC 9457 problem+json:

{
  "type": "https://docs.frem.sh/reference/api/errors/ai-draft-invalid",
  "title": "Unprocessable Entity",
  "status": 422,
  "detail": "..."
}

Branch on type, not on title or detail - those are human-readable and may be reworded.