WikibaseIntegrator icon indicating copy to clipboard operation
WikibaseIntegrator copied to clipboard

improve exception handling/ debug options

Open WolfgangFahl opened this issue 2 years ago • 3 comments

currently the exception handling for api calls is limited and makes debugging hard:

try:
            json_result: dict = mediawiki_api_call_helper(data=payload, login=login, allow_anonymous=allow_anonymous, is_bot=is_bot, **kwargs)
        except Exception:
            logging.exception('Error while writing to the Wikibase instance')
            raise

better

except Exception as ex:
# check what type of exception occured and give hints on what to do

WolfgangFahl avatar Jan 30 '23 05:01 WolfgangFahl

see #459

WolfgangFahl avatar Jan 30 '23 05:01 WolfgangFahl

e.g. look at messages_names=['wikibase-validator-label-with-description-conflict']

WolfgangFahl avatar Jan 30 '23 05:01 WolfgangFahl

see #507

WolfgangFahl avatar Jan 30 '23 06:01 WolfgangFahl