Skip to content

Commit 1033909

Browse files
committed
fix(annotations): fixed annotation error handling, fixes grafana#5077
1 parent b6dcf6b commit 1033909

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

public/app/features/annotations/annotations_srv.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ define([
5555
}, this);
5656
});
5757

58-
promiseCached = $q.all(promises)
59-
.then(function() {
60-
return list;
61-
});
58+
promiseCached = $q.all(promises).then(function() {
59+
return list;
60+
}).catch(function(err) {
61+
$rootScope.appEvent('alert-error', ['Annotations failed', (err.message || err)]);
62+
});
6263

6364
return promiseCached;
6465
};

0 commit comments

Comments
 (0)