From 3991d9dc065b4097b16bf911fc8865b1e3d56452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 18 Feb 2015 14:18:54 +0100 Subject: [PATCH] Added error handling to dashboard imports, #1493 --- src/app/features/account/importCtrl.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/features/account/importCtrl.js b/src/app/features/account/importCtrl.js index a8548491c60..f14374d2db1 100644 --- a/src/app/features/account/importCtrl.js +++ b/src/app/features/account/importCtrl.js @@ -43,6 +43,10 @@ function (angular, _) { $scope.importing = true; $scope.imported = []; $scope.next(); + }, function(err) { + var resp = err.message || err.statusText || 'Unknown error'; + var message = "Failed to load dashboards from selected data source, response from server was: " + resp; + $scope.appEvent('alert-error', ['Import failed', message]); }); };