From 87a782f6ff20af49f479913e827e25c0e0be0354 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 25 Jan 2017 10:32:26 -0400 Subject: [PATCH] fix(GUI): emit an analytics event on ENOSPC (#1044) There exists a change the user will run out of space on his drive when flashing an image format for which we can't guarantee its uncompressed size (e.g: gzip and bzip2). When that happens, we show a friendly error message explaining what happened, however we should also be emitting an analytics event. Change-Type: patch Changelog-Entry: Emit an analytics event on `ENOSPC`. Signed-off-by: Juan Cruz Viotti --- lib/gui/pages/main/controllers/flash.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/gui/pages/main/controllers/flash.js b/lib/gui/pages/main/controllers/flash.js index b3198f48..a9cfb30a 100644 --- a/lib/gui/pages/main/controllers/flash.js +++ b/lib/gui/pages/main/controllers/flash.js @@ -79,6 +79,7 @@ module.exports = function( AnalyticsService.logEvent('Validation error'); } else if (error.code === 'ENOSPC') { FlashErrorModalService.show(messages.error.notEnoughSpaceInDrive()); + AnalyticsService.logEvent('Out of space'); } else { FlashErrorModalService.show(messages.error.genericFlashError()); ErrorService.reportException(error);