VE-752: handle errors during document creation

These errors will be suppressed in-browser but tracked for monitoring
purposes.
Merge pull request #2636 from Wikia/VE-752

VE-752: handle errors during document creation