diff --git a/.gitignore b/.gitignore index 04138bb0..0270f003 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,10 @@ lib-cov *.out *.pid *.gz - +*.sublime-project +*.sublime-workspace +webapp-dependencies.txt + pids logs results diff --git a/js/actions/user_actions.js b/js/actions/user_actions.js index 44682f17..2a2c3c05 100644 --- a/js/actions/user_actions.js +++ b/js/actions/user_actions.js @@ -22,6 +22,7 @@ class UserActions { this.actions.updateCurrentUser({}); }); } + logoutCurrentUser() { return UserFetcher.logout() .then(() => { diff --git a/js/components/ascribe_forms/form.js b/js/components/ascribe_forms/form.js index 278901a7..0f022a0d 100644 --- a/js/components/ascribe_forms/form.js +++ b/js/components/ascribe_forms/form.js @@ -4,11 +4,12 @@ import React from 'react'; import ReactAddons from 'react/addons'; import Button from 'react-bootstrap/lib/Button'; +import AlertDismissable from './alert'; import requests from '../../utils/requests'; + import { getLangText } from '../../utils/lang_utils'; import { mergeOptionsWithDuplicates } from '../../utils/general_utils'; -import AlertDismissable from './alert'; let Form = React.createClass({ @@ -91,7 +92,14 @@ let Form = React.createClass({ } } else { - console.logGlobal(err, false, this.getFormData()); + let formData = this.getFormData(); + + // sentry shouldn't post the user's password + if(formData.password) { + delete formData.password; + } + + console.logGlobal(err, false, formData); this.setState({errors: [getLangText('Something went wrong, please try again later')]}); } this.setState({submitted: false}); diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index 1022a090..246a85c3 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -2,7 +2,6 @@ import React from 'react/addons'; import Router from 'react-router'; -import Raven from 'raven-js'; import Q from 'q'; import { getCookie } from '../../utils/fetch_api_utils'; @@ -302,7 +301,12 @@ var ReactS3FineUploader = React.createClass({ /* FineUploader specific callback function handlers */ - onComplete(id) { + onComplete(id, name, res, xhr) { + // there has been an issue with the server's connection + if(xhr.status === 0) { + return; + } + let files = this.state.filesToUpload; // Set the state of the completed file to 'upload successful' in order to @@ -351,7 +355,9 @@ var ReactS3FineUploader = React.createClass({ }, onError(id, name, errorReason) { - Raven.captureException(errorReason); + console.logGlobal(errorReason, false, this.state.filesToUpload); + this.state.uploader.cancelAll(); + let notification = new GlobalNotificationModel(this.props.defaultErrorMessage, 'danger', 5000); GlobalNotificationActions.appendGlobalNotification(notification); }, diff --git a/js/components/ascribe_uploader/vendor/s3.fine-uploader.js b/js/components/ascribe_uploader/vendor/s3.fine-uploader.js index f660a79d..17ec87fd 100644 --- a/js/components/ascribe_uploader/vendor/s3.fine-uploader.js +++ b/js/components/ascribe_uploader/vendor/s3.fine-uploader.js @@ -9489,6 +9489,13 @@ qq.s3.XhrUploadHandler = function(spec, proxy) { result.success, function failure(reason, xhr) { + + console.logGlobal(reason + 'in chunked.combine', false, { + uploadId, + etagMap, + result + }); + result.failure(upload.done(id, xhr).response, xhr); } );