#alexisadeveloper
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- alexisadeveloper, 2 days ago, 3 messages
- alexis-subscriptions-list, 2 days ago, 44 messages
- alexisadeveloper, 3 days ago, 6 messages
Can you share a sample event id where this happened?
Here it is evt_1O81aMEwHpTUe8W7uj2yhjn5
Hm ok
Can you check your server logs at the timestamp of the failure?
It should still have been a post request
Hopefully you can see request type in your server log
Should have been around 2023-11-02 14:09:27 UTC
The request Id is req_wdpzWv7EYgCfxK . I did not keep separate logs in our database for the event (since the method was already wrong), is that what you meant?
No
That's the stripe dashboard logs
Your webhook endpoint is running on a server, correct?
That server should log requests, etc
That's what I recommend taking a look at
I'm runnning the webhook on Vercel and all requests to the stripe webhook endpoint during that timeframe just say 200 ok
Pretty sure its a localized timestamp. Either way there are no requests at 14:09 and all the webhook requests around that time are also 200
So then the request didn't reach the server
Failed at the network leve/edge
Recommend working with your hosting provider then to debug
It's a network issue
`export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
) {
if (req.method === "POST") {
} else {
res.setHeader("Allow", "POST");
res.status(405).end("Method Not Allowed");
}
}` If it didn't reach the server at all, How is it possible that it still triggered this error in my webhook?
Or did it trigger that error somewhere else?
Sorry I'm just hoping to understand webhook failures better after this chat
It didn't trigger that error
If you check the logs for that failure on your dashboard, the response body was empty
Oh wait
Your code doesn't set a response body either
Yeah it's hard to say
But you said yourself you didn't have a 405 in your server logs
Maybe I should add a body to the response, just so that I know in the future whether it hit the endpoint or not?