try catch xhr.responseType assignement