Skip to content

Commit

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

The issue is that we're trying to parse the JSON response body when in fact we don't return a response body.
  • Loading branch information
orhantoy authored and kibanamachine committed Oct 15, 2021
1 parent e1d6830 commit 898bf79
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 898bf79

Please sign in to comment.