From 3985cd00dcd1e61e32742764a4ac2c01f64d24dc Mon Sep 17 00:00:00 2001 From: rhymes Date: Thu, 22 Feb 2018 09:47:15 +0100 Subject: [PATCH] Fix XHRUpload.js error handling There's an error introduced by https://github.com/transloadit/uppy/pull/612 here https://github.com/transloadit/uppy/pull/612/files#diff-ca5a310a56869b8b55189737dc65736cR238 It should be called with the response text and the xhr object. This fixes #645 --- src/plugins/XHRUpload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/XHRUpload.js b/src/plugins/XHRUpload.js index 2d8a79847..d6a63e24b 100644 --- a/src/plugins/XHRUpload.js +++ b/src/plugins/XHRUpload.js @@ -235,7 +235,7 @@ module.exports = class XHRUpload extends Plugin { return resolve(file) } else { - const body = opts.getResponseData(xhr) + const body = opts.getResponseData(xhr.responseText, xhr) const error = buildResponseError(xhr, opts.getResponseError(xhr.responseText, xhr)) const response = {