import { SearchResponse } from 'elasticsearch' ; import { OsdError } from '../../../../../opensearch_dashboards_utils/common' ; import { SearchError } from './types' ; param { Error } err param { Object } resp export class RequestFailure extends OsdError { public resp ? : SearchResponse < any > ; constructor ( err = null , resp ? ) { super ( `Request to OpenSearch failed: ${ JSON . stringify ( resp || err ?. message ) }` ) ; this . resp = resp ; } }