Add error log for XHR failure