mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
fix(GUI): properly pass error object to "Flash error" event (#1619)
Simply running `_.merge` on an Error object results in an empty plain object `{}` being sent to Mixpanel/Sentry. Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit is contained in:
parent
1d66794450
commit
b221914a3d
@ -25,6 +25,7 @@ const _ = require('lodash');
|
||||
const childWriter = require('../../child-writer');
|
||||
const settings = require('../models/settings');
|
||||
const flashState = require('../../shared/models/flash-state');
|
||||
const errors = require('../../shared/errors');
|
||||
const windowProgress = require('../os/window-progress');
|
||||
const analytics = require('../modules/analytics');
|
||||
|
||||
@ -134,7 +135,7 @@ imageWriter.service('ImageWriterService', function($q, $rootScope) {
|
||||
analytics.logEvent('Out of space', analyticsData);
|
||||
} else {
|
||||
analytics.logEvent('Flash error', _.merge({
|
||||
error
|
||||
error: errors.toJSON(error)
|
||||
}, analyticsData));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user