If the error occurs when attempting to publish a post:
Disable Gutenberg and return to using the classic editor (aka: TinyMCE) by installing the ‘Classic Editor’ plugin: https://wordpress.org/plugins/classic-editor/
When you activate the Classic Editor, it disables Gutenberg by default