Failure to communicate with the WordPress REST API causes the ‘Updating Failed’ or ‘Publishing Failed’ error in WordPress.
Basically, WordPress sometimes uses a set of APIs (programming methods) called REST API to send and receive requests to the WordPress database.
If it fails to send and receive those requests, then some parts of your WordPress website may not be able to function. These include the WordPress block editor, which uses the API to send update and publish requests to WordPress.