diff --git a/src/core/public/http/http_service.ts b/src/core/public/http/http_service.ts index d00e71ecaab4c5..5a73ade939365d 100644 --- a/src/core/public/http/http_service.ts +++ b/src/core/public/http/http_service.ts @@ -41,7 +41,7 @@ export class HttpService { return { fetch, - delete: shorthand('HEAD'), + delete: shorthand('DELETE'), get: shorthand('GET'), head: shorthand('HEAD'), options: shorthand('OPTIONS'), diff --git a/x-pack/plugins/kuery_autocomplete/public/autocomplete_providers/__tests__/value.js b/x-pack/plugins/kuery_autocomplete/public/autocomplete_providers/__tests__/value.js index d82558dad3bd92..d2cce4fe59282f 100644 --- a/x-pack/plugins/kuery_autocomplete/public/autocomplete_providers/__tests__/value.js +++ b/x-pack/plugins/kuery_autocomplete/public/autocomplete_providers/__tests__/value.js @@ -77,7 +77,6 @@ describe('Kuery value suggestions', function () { method: 'POST', body: '{"query":"","field":"machine.os.raw","boolFilter":[]}', credentials: 'same-origin', - signal: {}, headers: { 'Content-Type': 'application/json', 'kbn-version': '1.2.3', diff --git a/x-pack/plugins/rollup/public/search/rollup_search_strategy.js b/x-pack/plugins/rollup/public/search/rollup_search_strategy.js index 3ae5e21a9b065b..abc0bc620b81a1 100644 --- a/x-pack/plugins/rollup/public/search/rollup_search_strategy.js +++ b/x-pack/plugins/rollup/public/search/rollup_search_strategy.js @@ -104,10 +104,9 @@ export const rollupSearchStrategy = { }); return { - searching: new Promise((resolve, reject) => { - promise.then(result => { - resolve(shimHitsInFetchResponse(result)); - }).catch(error => { + searching: promise + .then(shimHitsInFetchResponse) + .catch(error => { const { body: { statusText, error: title, message }, res: { url }, @@ -122,9 +121,8 @@ export const rollupSearchStrategy = { type: getSearchErrorType({ message }), }); - reject(searchError); - }); - }), + return Promise.reject(searchError); + }), abort: () => controller.abort(), failedSearchRequests, };