mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Remove duplicate sentry logging on errors
This commit is contained in:
parent
1b4bf58129
commit
536ce12aac
@ -403,13 +403,15 @@ let ReactS3FineUploader = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onComplete(id, name, res, xhr) {
|
onComplete(id, name, res, xhr) {
|
||||||
// there has been an issue with the server's connection
|
// There has been an issue with the server's connection
|
||||||
if((xhr && xhr.status === 0) || res.error) {
|
if (xhr && xhr.status === 0 && res.success) {
|
||||||
console.logGlobal(new Error(res.error || 'Complete was called but there wasn\t a success'), false, {
|
console.logGlobal(new Error('Upload succeeded with a status code 0'), false, {
|
||||||
files: this.state.filesToUpload,
|
files: this.state.filesToUpload,
|
||||||
chunks: this.state.chunks
|
chunks: this.state.chunks,
|
||||||
|
xhr: this.getXhrErrorComment(xhr)
|
||||||
});
|
});
|
||||||
} else {
|
// onError will catch any errors, so we can ignore them here
|
||||||
|
} else if (!res.error || res.success) {
|
||||||
let files = this.state.filesToUpload;
|
let files = this.state.filesToUpload;
|
||||||
|
|
||||||
// Set the state of the completed file to 'upload successful' in order to
|
// Set the state of the completed file to 'upload successful' in order to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user