responseUtils.ts 291 B

123456
  1. import { DataFrame, Labels } from '@grafana/data';
  2. export function dataFrameHasLokiError(frame: DataFrame): boolean {
  3. const labelSets: Labels[] = frame.fields.find((f) => f.name === 'labels')?.values.toArray() ?? [];
  4. return labelSets.some((labels) => labels.__error__ !== undefined);
  5. }