1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-08 12:12:37 +01:00

added size/time info to up/download error reporting

This commit is contained in:
Danny Coates 2019-08-09 10:09:34 -07:00
parent 7073cc8ce6
commit 927c981cd7
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB

View File

@ -181,7 +181,10 @@ export default function(state, emitter) {
} else {
// eslint-disable-next-line no-console
console.error(err);
state.raven.captureException(err);
state.raven.captureException(err, {
duration: err.duration,
size: err.size
});
metrics.stoppedUpload(archive, err.duration);
emitter.emit('pushState', '/error');
}
@ -261,7 +264,11 @@ export default function(state, emitter) {
state.transfer = null;
const location = err.message === '404' ? '/404' : '/error';
if (location === '/error') {
state.raven.captureException(err);
state.raven.captureException(err, {
duration: err.duration,
size: err.size,
progress: err.progress
});
const duration = Date.now() - start;
metrics.stoppedDownload({
size,