diff --git a/public/app/features/dashboard/dashboardLoaderSrv.js b/public/app/features/dashboard/dashboardLoaderSrv.js index 588df632e9b..708e6b563e4 100644 --- a/public/app/features/dashboard/dashboardLoaderSrv.js +++ b/public/app/features/dashboard/dashboardLoaderSrv.js @@ -43,6 +43,13 @@ function (angular, moment, _, $, kbn, dateMath, impressionSrv) { }); } else { promise = backendSrv.getDashboard($routeParams.type, $routeParams.slug) + .then(result => { + if (result.meta.isFolder) { + $rootScope.appEvent("alert-error", ['Dashboard not found']); + throw new Error("Dashboard not found"); + } + return result; + }) .catch(function() { return self._dashboardLoadFailed("Not found"); });