added hook for webpage.onResourceError