Provide useful error details when publishing fails
From our logs, we see 4 main reasons for publishing failures.
- Timeout. Related to network.
- spamblacklist catching URLs in translation.
- User blocked from editing. Now we don't allow these users to see Special:CX at all, see Ib6cdcc2e5f6e7fc631e5ff7d1d3a4f812f5fa6a6
- Parsoid failed to convert the HTML to wikitext.
For all of these, provide a brief hint in the publishing error message.
Here is a way to trick CX and create a publishing error:
Translate any article.
Add a section without any reference to translation.
Clear the paragraph completely. The publish button will get disabled.
Now type a space in the empty paragraph.
The publish button will get enabled again.
Publish the page and get the error:
"An error occurred while publishing the translation.
Please try to publish the page again. Error: html cannot be empty".