handleResponse