Skip to content

Commit

Permalink
add error data frame
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Sebastian <[email protected]>
  • Loading branch information
paulstn committed Apr 28, 2024
1 parent 307056c commit 4d48049
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/plugins/data/common/data_frames/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ export interface PartialDataFrame extends Omit<IDataFrame, 'fields' | 'size'> {
export interface IDataFrameWithAggs extends IDataFrame {
aggs: DataFrameAgg[] | null;
}

export interface IDataFrameError {
error: Error;
}
4 changes: 2 additions & 2 deletions src/plugins/data/common/data_frames/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import { SearchResponse } from 'elasticsearch';
import datemath from '@elastic/datemath';
import { IDataFrame, IDataFrameWithAggs, PartialDataFrame } from './types';
import { IDataFrame, IDataFrameError, IDataFrameWithAggs, PartialDataFrame } from './types';
import { IFieldType } from './fields';
import { IndexPatternFieldMap, IndexPatternSpec } from '../index_patterns';
import { IOpenSearchDashboardsSearchRequest } from '../search';
Expand All @@ -20,7 +20,7 @@ const name = 'data_frame';

export interface IDataFrameResponse extends SearchResponse<any> {
type: typeof name;
body: IDataFrame | IDataFrameWithAggs;
body: IDataFrame | IDataFrameWithAggs | IDataFrameError;
took: number;
}

Expand Down

0 comments on commit 4d48049

Please sign in to comment.