You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not possible to provide a body when calling shutdown.putNode, and ES requires a body for this API. It appears that body is being defaulted to undefined but it is never overwritten if params.body is provided:
returnawaitthis.transport.request({ path, method, querystring, body },options)
To Reproduce
Steps to reproduce the behavior:
awaitclient.shutdown.putNode({node_id: 'test_node_01',// ts also complains about the presence of `body`, so you need a @ts-expect-errorbody: {type: 'restart',reason: 'testing shutdown',allocation_delay: '20m',},});
Response:
ResponseError: parse_exception: [parse_exception] Reason: request body is required
Expected behavior
The provided body should be passed to ES, and the TS types shouldn't complain about it.
Your Environment
node version: 16.4.2
@elastic/elasticsearchversion: 8.2.0-canary.2 (but I suspect this has been present for several versions now)
os: Mac
discovered this while writing an integration test for Kibana that attempted to use the node shutdown API
The text was updated successfully, but these errors were encountered:
馃悰 Bug Report
It is not possible to provide a
body
when callingshutdown.putNode
, and ES requires a body for this API. It appears thatbody
is being defaulted toundefined
but it is never overwritten ifparams.body
is provided:elasticsearch-js/src/api/api/shutdown.ts
Lines 104 to 117 in 4492532
To Reproduce
Steps to reproduce the behavior:
Response:
Expected behavior
The provided
body
should be passed to ES, and the TS types shouldn't complain about it.Your Environment
@elastic/elasticsearch
version: 8.2.0-canary.2 (but I suspect this has been present for several versions now)The text was updated successfully, but these errors were encountered: