Переглянути джерело

stackdriver: remove redundant try catch

Erik Sundell 7 роки тому
батько
коміт
996b470dd0

+ 3 - 7
public/app/plugins/datasource/stackdriver/StackdriverMetricFindQuery.ts

@@ -60,13 +60,9 @@ export default class StackdriverMetricFindQuery {
     if (!selectedMetricType) {
       return [];
     }
-    try {
-      const refId = 'handleResourceTypeQueryQueryType';
-      const response = await this.datasource.getLabels(selectedMetricType, refId);
-      return response.meta.resourceTypes.map(this.toFindQueryResult);
-    } catch (error) {
-      return [];
-    }
+    const refId = 'handleResourceTypeQueryQueryType';
+    const response = await this.datasource.getLabels(selectedMetricType, refId);
+    return response.meta.resourceTypes.map(this.toFindQueryResult);
   }
 
   async handleAlignersQuery({ selectedMetricType }) {