Call onReadyStateChange when the request fails.