My netlify site is vibrant-northcutt-f52256.netlify.app
.
I’ve followed this guide (Automate Order Fulfillment w/ Stripe Webhooks & Netlify Functions) to create a webhook for Stripe using JS. Instead of Sengrid to send emails to my fulfilment provider, I’m using their API, so I’m making a POST
request using axios
.
Locally, I’m testing everything with the Stripe forwarding (as per the blog post) and ntl dev
and everything works like a charm: no errors, no problems. The order is created as it should.
In prod I see log messages up to the point where I POST
. Here’s a snippet:
console.log("POSTing data to fulfillment"); // PRINTS IN LOG
axios(axiosconfig)
.then(function (response) {
console.log("INSIDE THE RESPONSE"); // DOES NOT PRINT IN LOG
console.log(JSON.stringify(response.data));
And that’s it. I see that final message before axios
does its thing, then just
Jul 25, 05:10:24 PM: 0bc7d830 INFO POSTing data to fulfillment
Jul 25, 05:10:25 PM: 0bc7d830 Duration: 429.16 ms Memory Usage: 78 MB Init Duration: 351.53 ms
what’s up? Is it forbidden to POST
from a function? I’m just baffled by the lack of any feedback. If something is breaking, there should be an error message. The try catch
does nothing either.