save.error - Events - Author Aide API

Author Aide API Events

save:error

Fires when a save operation has failed in the Author Aide API.

You would want to be notified about this event firing, because you might want to show an error message, log the error, or allow the user to retry the save operation.

Examples

authorAideApp.on('save:error', function (event) {
    console.log('This code executes when a save operation has failed.');
    console.log('Item reference(s):', event.itemReference);
    console.log('Current path:', event.currentPath);
    console.log('Save mode:', event.mode);
    console.log('Error message:', event.error);
});

Callback arguments

  • itemReference string array[string]

    The reference of the Item that was being saved.

    An array of Item references that were being saved in bulk operations.

  • currentPath string

    The current path where save was initiated.

  • mode string

    The save mode indicating the type of operation being performed.

    Possible values

    • "generate" Content generation operation
    • "translate" Translation operation
    • "edit" Manual editing operation
    • "bulk" Bulk operation on multiple Items
  • error string

    The error message describing what went wrong during the save operation.

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.