#alexisadeveloper

1 messages · Page 1 of 1 (latest)

pastel gullBOT
#

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.

rigid holly
#

Can you share a sample event id where this happened?

prime beacon
#

Here it is evt_1O81aMEwHpTUe8W7uj2yhjn5

rigid holly
#

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

prime beacon
#

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?

rigid holly
#

No your server logs

#

The logs for the webhook endpoint

prime beacon
#

is this what you mean?

#

When i go to the failed webhook request this is all i see

rigid holly
#

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

prime beacon
#

I'm runnning the webhook on Vercel and all requests to the stripe webhook endpoint during that timeframe just say 200 ok

rigid holly
#

14:09

#

not 15:09

#

Unless that's a localized timestamp

#

Is that UTC?

prime beacon
#

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

rigid holly
#

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

prime beacon
#

`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

rigid holly
#

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

prime beacon
#

Maybe I should add a body to the response, just so that I know in the future whether it hit the endpoint or not?