mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +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) {
|
||||
// there has been an issue with the server's connection
|
||||
if((xhr && xhr.status === 0) || res.error) {
|
||||
console.logGlobal(new Error(res.error || 'Complete was called but there wasn\t a success'), false, {
|
||||
// There has been an issue with the server's connection
|
||||
if (xhr && xhr.status === 0 && res.success) {
|
||||
console.logGlobal(new Error('Upload succeeded with a status code 0'), false, {
|
||||
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;
|
||||
|
||||
// Set the state of the completed file to 'upload successful' in order to
|
||||
|
Loading…
Reference in New Issue
Block a user