From 10339090b80b80fc07f2670971efae13ea71c794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 18 May 2016 15:22:40 +0200 Subject: [PATCH] fix(annotations): fixed annotation error handling, fixes #5077 --- public/app/features/annotations/annotations_srv.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/app/features/annotations/annotations_srv.js b/public/app/features/annotations/annotations_srv.js index b0022135ef5..a693dd602c8 100644 --- a/public/app/features/annotations/annotations_srv.js +++ b/public/app/features/annotations/annotations_srv.js @@ -55,10 +55,11 @@ define([ }, this); }); - promiseCached = $q.all(promises) - .then(function() { - return list; - }); + promiseCached = $q.all(promises).then(function() { + return list; + }).catch(function(err) { + $rootScope.appEvent('alert-error', ['Annotations failed', (err.message || err)]); + }); return promiseCached; };