Expose HTTP status and reason to onResourceError (#12252).

As described in issue #12252.