Skip to content

400 bad request trying to autosave empty content #6556

@bobbingwide

Description

@bobbingwide

Issue Overview

When adding a new post I got an unexpected "Updating failed" message.
The console log showed 400 bad request.
The response being

{"code":"empty_content","message":"Content, title, and excerpt are empty.","data":{"status":400}}

Steps to Reproduce (for bugs)

  1. Add a new post.
  2. Insert a Classic block
  3. Wait a while

Expected Behavior

Either no attempt to save the post or allow the empty content to be saved.

Current Behavior

Autosave kicks in. Since none of the following have been entered... Title, Content and Excerpt
we get the 400 Bad request. which leads to the display of the unexpected "Updating failed" message.

Possible Solution

Screenshots / Video

Related Issues and/or PRs

#1201

Todos

  • Tests
  • Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backwards CompatibilityIssues or PRs that impact backwards compatabilityREST API InteractionRelated to REST API[Feature] SavingRelated to saving functionality[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions