Skip to content

Commit

Permalink
fix: do not suppress datasource errors
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Mar 13, 2023
1 parent 7b13ec4 commit fa62704
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions src/DataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import {
BackendSrvRequest,
} from '@grafana/runtime';
import { isArray, isObject } from 'lodash';
import { lastValueFrom, of } from 'rxjs';
import { catchError, map } from 'rxjs/operators';
import { lastValueFrom } from 'rxjs';
import { map } from 'rxjs/operators';
import { ResponseParser } from './response_parser';
import {
GenericOptions,
Expand Down Expand Up @@ -76,11 +76,6 @@ export class DataSource extends DataSourceApi<GrafanaQuery, GenericOptions> {
response.data = response.data.map(toDataFrame);

return response;
}),
catchError((err) => {
console.error(err);

return of({ data: [] });
})
)
);
Expand Down Expand Up @@ -150,11 +145,6 @@ export class DataSource extends DataSourceApi<GrafanaQuery, GenericOptions> {
map((response) => {
return this.responseParser.transformMetricFindResponse(response);
}),
catchError((err) => {
console.error(err);

return of([]);
})
)
);
}
Expand All @@ -179,11 +169,6 @@ export class DataSource extends DataSourceApi<GrafanaQuery, GenericOptions> {
? response.data.map((item) => ({ ...item, label: item.label ? item.label : item.value }))
: []
),

catchError((err) => {
console.error(err);
return of([]);
})
)
);
}
Expand Down Expand Up @@ -220,12 +205,6 @@ export class DataSource extends DataSourceApi<GrafanaQuery, GenericOptions> {
};
});
}),

catchError((err) => {
console.error(err);

return of([]);
})
)
);
}
Expand All @@ -238,11 +217,6 @@ export class DataSource extends DataSourceApi<GrafanaQuery, GenericOptions> {
data: options,
}).pipe(
map((result) => result.data),
catchError((err) => {
console.error(err);

return of([]);
})
)
);
}
Expand All @@ -255,11 +229,6 @@ export class DataSource extends DataSourceApi<GrafanaQuery, GenericOptions> {
data: options,
}).pipe(
map((result) => result.data),
catchError((err) => {
console.error(err);

return of([]);
})
)
);
}
Expand Down

0 comments on commit fa62704

Please sign in to comment.