mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +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) {
|
||||
console.logGlobal(errorReason, false, {
|
||||
onError(id, name, errorReason, xhr) {
|
||||
const errorComment = {
|
||||
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();
|
||||
|
||||
|
@ -9674,10 +9674,10 @@ qq.s3.XhrUploadHandler = function(spec, proxy) {
|
||||
uploadIdPromise.success(uploadId);
|
||||
promise.success(uploadId);
|
||||
},
|
||||
function(errorMsg) {
|
||||
function(errorMsg, xhr) {
|
||||
handler._getPersistableData(id).uploadId = null;
|
||||
promise.failure(errorMsg);
|
||||
uploadIdPromise.failure(errorMsg);
|
||||
promise.failure(errorMsg, xhr);
|
||||
uploadIdPromise.failure(errorMsg, xhr);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user