Fix crashes in onLoadError()

The jqXHR parameter is optional, so handle the case where it's null
gracefully.

Also fix the documentation for this method, it was full of lies.

Change-Id: I6ab799846a4d4b0d10cc5fd4d8c47264b1845bdf
Merge "Fix crashes in onLoadError()"