Why do I get quill errors why I try to PATCH (or POST) a Discussion using the API


https://trial1.vanillacommunity.com/api/v2/discussions/6


{
    "format": "rich",
    "body": "I would like to learn to fly high."
}

ERROR:

{
    "message": "Validation Failed",
    "status": 400,
    "errors": [
        {
            "field": "body",
            "code": "JSON could not be converted into quill operations.\n <p>I would like to learn to fly high.</p>",
            "status": 400,
            "message": "JSON could not be converted into quill operations.\n <p>I would like to learn to fly high.</p>."
        }
    ]
}


Works fine if I use "text" or "markdown"

Best Answers

  • Unknown
    Answer ✓

    You gave a plain text string that isn't the correct rich format. That string should be expressed as either text or markdown like you did. Really, the rich format is for the rich editor that has quite a complex internal format that is not easily typed into an API call by hand.

  • Unknown
    Answer ✓

    If you are posting direct HTML then the format is actually "wysiwyg". This is slightly counter-intuitive, I know, but we have an older "html" format that also does a bit of post-processing on the text.

Answers