Преглед изворни кода

stackdriver: remove redundant try catch

Erik Sundell пре 7 година
родитељ
комит
996b470dd0
1 измењених фајлова са 3 додато и 7 уклоњено
  1. 3 7
      public/app/plugins/datasource/stackdriver/StackdriverMetricFindQuery.ts

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

@@ -60,13 +60,9 @@ export default class StackdriverMetricFindQuery {
     if (!selectedMetricType) {
     if (!selectedMetricType) {
       return [];
       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 }) {
   async handleAlignersQuery({ selectedMetricType }) {