#Fetch failed in collection hook

6 messages · Page 1 of 1 (latest)

granite sleet
#

Trying to post a document to my vector db api via a hook but am getting the following issue:

TypeError: fetch failed
   at Object.fetch (node:internal/deps/undici/undici:11576:11)
  at processTicksAndRejections (node:internal/process/task_queues:95:5)
const response = await fetch("http://localhost:8000/index", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      docs_request: documents,
    }),
  });

Don't think this is necessarily a Payload issue but just looking for some help if anyone has experienced this

past sirenBOT
random temple
#

@granite sleet Good morning!

#

Do you know what status code the request failed iwth?

#

Also, can you list the access controls set for that particular collection?

#

Thanks!