CDB-2795 Improve error detection in viz.json action

Added exception throwing if couldn't load template