#bondsmith_error
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1308835691571970129
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! I'm not sure. If something goes wrong it should throw an error. That said, I'm not very familiar with NestJS or AWS Lambda. You might need to reach out to their support for help.
Hi Rubeus, thank you for the quick reply.
Usually this kind of thing would be caused by a missing await, but you've got the appropriate await in there, so I'm not sure what's going on.
Agreed... I've been trying loads of things for the past few days to no success...
I see in the package dependencies that there is a node-fetch dev dependency, do you know how I could use this over the native node http package?
Hm, I thought it was a configuration here, but I'm only seeing a configuration for a proxy... https://github.com/stripe/stripe-node?tab=readme-ov-file#initialize-with-config-object
Ah, there's a bit of info in this comment: https://github.com/stripe/stripe-node/blob/d12717a912bb6c324ec4b18ea607e1e2ab017171/src/net/FetchHttpClient.ts#L15-L22
Same, I know that the other configuration for httpClient exists due to some Issues on GitHub and the d.ts files in the module. I tried this
const httpClient = Stripe.createNodeHttpClient();
const makeRequest = httpClient.makeRequest.bind(httpClient);
httpClient.makeRequest = (...args) => {
return makeRequest(...args).then((res: Stripe.HttpClientResponse) => {
if (res.getStatusCode() > 399) {
throw res;
}
return res;
});
};
The code above makes the package throw an error, but the error will always be the same error:
"An error occurred with our connection to Stripe. Request was retried 2 times."
Here's the PR which added node-fetch with some further details: https://github.com/stripe/stripe-node/pull/1253
Thanks! I'm goint to try that out
It might take me a while to run this, should I comment on this thread or a new one to continue this question?
We close idle threads; if you come back and this thread is still open you can ask here. If this thread is closed feel free to open a new one. ๐
Thank you very much for the help @timid spear ! Have a great day.