Refactor DocumentWorker for better error reporting
Refactor DocumentWorker for better error reporting

Bug: T250396
Change-Id: Id2cfd3464ebf066043687a6242c83a2cca3574ac

wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps