Hi, I am following the sample code from langchain site https://js.langchain.com/docs/modules/indexes/document_loaders/examples/web_loaders/apify_dataset and I am getting into [Nest] 18014 - 05/31/2023, 9:03:45 PM ERROR [ExceptionsHandler] Request failed with status code 400 Error: Request failed with status code 400 at createError (/Users/adamsobotka/Develop/apifipt/node_modules/.pnpm/[email protected]/node_modules/axios/lib/core/createError.js:16:15) at settle (/Users/adamsobotka/Develop/apifipt/node_modules/.pnpm/[email protected]/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/Users/adamsobotka/Develop/apifipt/node_modules/.pnpm/[email protected]/node_modules/axios/lib/adapters/http.js:322:11) at IncomingMessage.emit (node:events:523:35) at endReadableNT (node:internal/streams/readable:1367:12) at processTicksAndRejections (node:internal/process/task_queues:82:21) error. Any idea what could be wrong?
#Getting error from Axios
1 messages · Page 1 of 1 (latest)
Hey there? Could you please elaborate - which exactly example are you following there? Did you already create an Apify acc. and ran an actor there? Would be great if you could provide more details.
Absolutely. I'm following second example from the page I linked, nodejs example of loading data from the existing dataset (therefore, yes, I ran the actor and scraped the web successfully). Basically the only difference is that I've turned the example to the nestjs service. I'll remove the hardcoded security and share the code
here is the repo: https://github.com/vorcigernix/apifipt
Thanks, sent to the team for furhter investigation!
hey, sorry for late reply, was rather sick for a couple of days. Response from one of our devs (not much news though):
I'm sorry but I can't get much out of the error. Can he wrap stuff inside the askGPT method in https://github.com/vorcigernix/apifipt/blob/master/src/app.service.ts in try-catch blocks to determine which part of the code is failing?
The error is in last function that call the chain. More specific error is: TypeError: Cannot read properties of undefined (reading 'call') at AppService.askGPT (/Users/adamsobotka/Develop/apifipt/src/app.service.ts:58:25) at processTicksAndRejections (node:internal/process/task_queues:95:5) at /Users/adamsobotka/Develop/apifipt/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@nestjs/core/router/router-execution-context.js:46:28 at /Users/adamsobotka/Develop/apifipt/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@nestjs/core/router/router-proxy.js:9:17 [Nest] 12020 - 06/05/2023, 1:04:19 PM ERROR [ExceptionsHandler] Cannot read properties of undefined (reading 'text')
Thanks! Passed to the team for further investigation 👍
Hello @shut field ,
I am curious, and maybe I am missing something.
Based on the error is see your variable chain is undefined. The instance is constructed based on model and vectorStore. Non of these are related to the Apify enviroment right?
Yeah, correct. Can't figure out why though. But nvm, I gave up on this.