Skip to content

Show error on UI when API save fails #43

@malberts

Description

@malberts

When updating Rules via the UI, there should be an error message if the API call fails:

async function saveRules( api, title ) {
saving.value = true;
try {
const content = JSON.stringify( { rules: rules.value } );
return await api.postWithToken( 'csrf', {
action: 'edit',
title,
text: content
} );
} finally {
saving.value = false;
}
}

This can happen for various reasons, but as an example, if the user is logged out while editing:

Screencast_20250730_021148.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions