Skip to content

Commit

Permalink
Fix handling syntax error in discover
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasolson committed Mar 23, 2020
1 parent 8eebe08 commit 716b54b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function getPainlessError(error: Error) {
const rootCause: Array<{ lang: string; script: string }> | undefined = get(
error,
'body.attributes.error.root_cause'
);
) || [get(error, 'body.attributes.error')];
const message: string = get(error, 'body.message');

if (!rootCause) {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/search/search_interceptor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('SearchInterceptor', () => {
const response = searchInterceptor.search(mockSearch, mockRequest);
mockResponse.complete();

response.subscribe({});
response.subscribe();
expect(mockSearch.mock.calls[0][0]).toBe(mockRequest);
});

Expand Down

0 comments on commit 716b54b

Please sign in to comment.