mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
Add xhr details to sentry logging
FineUploader’s s3.XhrUploadHandler was also fixed to pass down the xhr object when initiating a multipart upload fails.
This commit is contained in:
parent
66a38314e3
commit
8db531fb87
@ -456,11 +456,19 @@ let ReactS3FineUploader = React.createClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onError(id, name, errorReason) {
|
onError(id, name, errorReason, xhr) {
|
||||||
console.logGlobal(errorReason, false, {
|
const errorComment = {
|
||||||
files: this.state.filesToUpload,
|
files: this.state.filesToUpload,
|
||||||
chunks: this.state.chunks
|
chunks: this.state.chunks,
|
||||||
});
|
};
|
||||||
|
if (xhr) {
|
||||||
|
errorComment.xhr = {
|
||||||
|
response: xhr.response,
|
||||||
|
status: xhr.status,
|
||||||
|
statusText: xhr.statusText
|
||||||
|
};
|
||||||
|
}
|
||||||
|
console.logGlobal(errorReason, false, errorComment);
|
||||||
|
|
||||||
this.cancelUploads();
|
this.cancelUploads();
|
||||||
|
|
||||||
|
@ -9674,10 +9674,10 @@ qq.s3.XhrUploadHandler = function(spec, proxy) {
|
|||||||
uploadIdPromise.success(uploadId);
|
uploadIdPromise.success(uploadId);
|
||||||
promise.success(uploadId);
|
promise.success(uploadId);
|
||||||
},
|
},
|
||||||
function(errorMsg) {
|
function(errorMsg, xhr) {
|
||||||
handler._getPersistableData(id).uploadId = null;
|
handler._getPersistableData(id).uploadId = null;
|
||||||
promise.failure(errorMsg);
|
promise.failure(errorMsg, xhr);
|
||||||
uploadIdPromise.failure(errorMsg);
|
uploadIdPromise.failure(errorMsg, xhr);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user