Kaynağa Gözat

fix templating error dialog for Prometheus

Mitsuhiro Tanda 10 yıl önce
ebeveyn
işleme
65bc194c42
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      public/app/services/backendSrv.js

+ 5 - 0
public/app/services/backendSrv.js

@@ -106,6 +106,11 @@ function (angular, _, config) {
           });
         }
 
+        // for Prometheus
+        if (!err.data.message && _.isString(err.data.error)) {
+          err.data.message = err.data.error;
+        }
+
         throw err;
       });
     };