Skip to content

Commit

Permalink
[App Search] Fix handling of body-less meta engine responses (#115043) (
Browse files Browse the repository at this point in the history
#115187)

The issue is that we're trying to parse the JSON response body when in fact we don't return a response body.

Co-authored-by: Orhan Toy <[email protected]>
  • Loading branch information
kibanamachine and orhantoy authored Oct 15, 2021
1 parent d18687f commit c1b8d5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ describe('source engine routes', () => {
it('creates a request to enterprise search', () => {
expect(mockRequestHandler.createRequest).toHaveBeenCalledWith({
path: '/as/engines/:name/source_engines/bulk_create',
hasJsonResponse: false,
});
});
});
Expand Down Expand Up @@ -145,6 +146,7 @@ describe('source engine routes', () => {
it('creates a request to enterprise search', () => {
expect(mockRequestHandler.createRequest).toHaveBeenCalledWith({
path: '/as/engines/:name/source_engines/:source_engine_name',
hasJsonResponse: false,
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export function registerSourceEnginesRoutes({
},
enterpriseSearchRequestHandler.createRequest({
path: '/as/engines/:name/source_engines/bulk_create',
hasJsonResponse: false,
})
);

Expand All @@ -60,6 +61,7 @@ export function registerSourceEnginesRoutes({
},
enterpriseSearchRequestHandler.createRequest({
path: '/as/engines/:name/source_engines/:source_engine_name',
hasJsonResponse: false,
})
);
}

0 comments on commit c1b8d5e

Please sign in to comment.