onClose and onError listeners for Response object