error: Uncaught (in promise) TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at _from (ext:deno_node/internal/buffer.mjs:217:9)
at Function.from (ext:deno_node/internal/buffer.mjs:229:10)
at new Client (file:///home/ayelsew/Desktop/workers/node_modules/.deno/@elastic+elasticsearch@8.15.2/node_modules/@elastic/elasticsearch/lib/client.js:91:38)
at file:///home/ayelsew/Desktop/workers/src/infra/elastic/elastic_client.ts:3:16
But bout the cloud ID, I guess it is a Deno's limitation not elastic client.
To reproduce
setup client:
import { Client } from "@elastic/elasticsearch";
const client = new Client({
node: "https://XPTO.aws.found.io:443",
auth: {
apiKey: "XPTO"
}
});
🐛 Bug report
When I try to make a search request, server responds with "Client sent an HTTP request to an HTTPS server", even if I use a HTTPS URL
I put an console.log inside the transport layer of the library, and I saw this:
It are using the https:// schema, so think "I did the right thing"
Also I tested the last version 8.16.2, and had the same behavior
FYI: I had performed the same request using cURL or Postman, and it worked.
I tried to use the cloud ID too but it throw me the follow error:
But bout the cloud ID, I guess it is a Deno's limitation not elastic client.
To reproduce
setup client:
Do a request search
Expected behavior
I expect that
search()
method returns the result instead of throwing error "Client sent an HTTP request to an HTTPS server"Node.js version
20.11.1
@elastic/elasticsearch version
8.15.2
Operating system
Garuda linux 6.11.9-zen1-1-zen-x64
Any other relevant environment information
deno 2.1.1 Elastic search version v8.15.2