Hello, I want to rollback a page using JavaScript. for that, I use the following syntax:
new mw.Api().postWithToken('rollback', {
action: 'rollback',
title: 'pageName',
user: 'userName'
});
If the rollback has not succeeded (e.g., if the user does not have the necessary right), I would like to display an error message. How can I check if the rollback has been succeeded?