Add ResourceEvent to handle errors instead of stopPropagation