ItemPage.set_redirect_target should throw an Exception on error
Open, Needs TriagePublic

Description

Currently errors are silently ignored:

if data.get('success', 0):
    del self.latest_revision_id
    self._isredir = True
    self._redirtarget = target_page
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJun 18 2017, 7:53 PM

Context https://gerrit.wikimedia.org/r/#/c/336886/4/pywikibot/page.py . It does throw some exceptions, but why does it check for success? What if it's not successful?