Fire `onResourceReceived` callback when the resource error occured.

Issue:
https://github.com/ariya/phantomjs/issues/11163