Replaced Client#xhrFilter with Client#onXhr, and added Client#onError.