response.error is undefined.

response.error is undefined
change to xhr.statusText