Skip to content

Site editor: add details to "Saving failed" error message #57245

Closed

Description

@creativecoder

What problem does this address?

When there's an error saving updates to the site, the error message I've seen displayed in the Site editor is generic and doesn't give any detail.

image

What is your proposed solution?

Provide an error message with more information about what when wrong, to help troubleshoot the error.

Activity

  1. added
    [Type] Enhancement
    on Dec 20, 2023
  2. changed the title [-]Site editor: add details to Save error[/-] [+]Site editor: add details to "Saving failed" error message[/+] on Dec 20, 2023
  3. added
    [Feature] Site Editor
    on Dec 20, 2023
  4. added
    [Status] In Progress
    on Jan 21, 2025
  5. sirreal commented on Jan 8, 2026

    @sirreal
    Member

    A failed API response looks like this:

    {
        "code": "rest_custom_css_illegal_markup",
        "message": "Example human-readable message here.",
        "data": {
            "status": 400
        }
    }
  6. Mamaduka commented on Jan 8, 2026

    @Mamaduka
    Member

    @sirreal, I think we should be able to reuse getNotificationArgumentsForSaveFail util here as well.

    const args = getNotificationArgumentsForSaveFail( {
    post: previousRecord,
    edits,
    error,
    } );
    if ( args.length ) {
    registry.dispatch( noticesStore ).createErrorNotice( ...args );
    }

    P.S. There's also another associated PR for this issue by @kartikmehta8. Let's not forget to give them props.

  7. ntsekouras commented on Sep 21, 2026

    @ntsekouras
    Contributor

    This was fixed in #81151, the save snackbar now shows the message the server returns and only falls back to "Saving failed." when there is none. So I'm closing this one. Feel free to reopen if I'm missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

[Feature] Site Editor[Status] In Progress[Type] Enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions