Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza K committed Jan 28, 2021
1 parent f74e58b commit edaa188
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Constructs a new instance of the `PainlessError` class
<b>Signature:</b>

```typescript
constructor(err: KibanaServerError);
constructor(err: IEsError);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| err | <code>KibanaServerError</code> | |
| err | <code>IEsError</code> | |

5 changes: 3 additions & 2 deletions src/plugins/data/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1867,8 +1867,8 @@ export interface OptionedValueProp {
//
// @public (undocumented)
export class PainlessError extends EsError {
// Warning: (ae-forgotten-export) The symbol "KibanaServerError" needs to be exported by the entry point index.d.ts
constructor(err: KibanaServerError);
// Warning: (ae-forgotten-export) The symbol "IEsError" needs to be exported by the entry point index.d.ts
constructor(err: IEsError);
// (undocumented)
getErrorMessage(application: ApplicationStart): JSX.Element;
// (undocumented)
Expand Down Expand Up @@ -2282,6 +2282,7 @@ export class SearchInterceptor {
protected readonly deps: SearchInterceptorDeps;
// (undocumented)
protected getTimeoutMode(): TimeoutErrorMode;
// Warning: (ae-forgotten-export) The symbol "KibanaServerError" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "AbortError" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down
26 changes: 13 additions & 13 deletions test/api_integration/apis/search/bsearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,20 @@ export default function ({ getService }: FtrProviderContext) {
after(async () => {
await esArchiver.unload('../../../functional/fixtures/es_archiver/logstash_functional');
});
});
it('should return 400 for Painless error', async () => {
const resp = await supertest.post(`/internal/bsearch`).send({
batch: [
{
request: painlessErrReq,
},
],
});
it('should return 400 for Painless error', async () => {
const resp = await supertest.post(`/internal/bsearch`).send({
batch: [
{
request: painlessErrReq,
},
],
});

expect(resp.status).to.be(200);
parseBfetchResponse(resp).forEach((responseJson, i) => {
expect(responseJson.id).to.be(i);
verifyErrorResponse(responseJson.error, 400, 'search_phase_execution_exception', true);
expect(resp.status).to.be(200);
parseBfetchResponse(resp).forEach((responseJson, i) => {
expect(responseJson.id).to.be(i);
verifyErrorResponse(responseJson.error, 400, 'search_phase_execution_exception', true);
});
});
});
});
Expand Down

0 comments on commit edaa188

Please sign in to comment.