[IMPR] Provide a better error messages
[IMPR] Provide a better error messages

Bug: T213855
Change-Id: I5bb9e9a1722b00ba8ea6391229dfaab6f405dbe9

wikimedia/pywikibot-core,wikimedia/pywikibot-core,PersianWikipedia/pywikibot-core