Inform javascript on didFailWithError

Make sure the javascript error method is called when didFailWithError is executed.