#mulo_webhooks-502

1 messages ¡ Page 1 of 1 (latest)

topaz muralBOT
#

👋 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/1278471975500779623

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

lime schooner
#

in my backend I always send response.status(200).end();

#

so why am I getting it twice?

hoary lodge
#

Can you grab the Event ID for both of the webhooks and paste them here?

#

Should look like this --> evt_abc123

lime schooner
#

can i grab those from dashboard?(i dont save them in the backend)

hoary lodge
#

Yup! they should be retrievable by searching the Subscription ID and looking at the related events

hoary lodge
#

I need the actual text of the Event ID so I can view it on my end. Can you copy/paste?

lime schooner
#

now that i notice i do get sometimes a log:
[ErrorReply: NOAUTH Authentication required.]
tho not sure where it logs out from

hoary lodge
#

What's the Event ID for the duplicate?

lime schooner
#

im guessing is the same id

hoary lodge
#

Ah, okay. Let me look

lime schooner
#

that costumer there is the only one

#

i did get webhook twice for other costumers tho

#

so is a reocurring issue

hoary lodge
#

Wait, you sent me the wrong event. You were talking about invoice.paid but you copy/pasted a checkout.session.completed Event ID

lime schooner
#

ah sec

lime schooner
#

im only linstening for invoice.paid

hoary lodge
#

If you look up the ID for that Invoice's invoice.paid Event (evt_1PssRlK98lEnV33FHWU5z2iB) you'll see that there was a failed webhook and a successful one. The failed one sent back 502 BAD GATEWAY to Stripe, so something is awry with your server and/or the webhook handler if this is happening frequently.

lime schooner
hoary lodge
#

Could be, but that's not a Stripe error, so I have no idea

lime schooner
#

i mean the code is the same the 2nd time around, so i dont understand how it always fails the 1st time, but then the 2nd works

#

also by the time i save the event in my db, it means it can only reply with 200

#

as there are no other options in my code after that

hoary lodge
#

502 errors indicate an internal server error. You might want to look into what http_bad_gateway means and do a network dump of all the requests your server received during the failed webhook attempt

lime schooner
hoary lodge
#

502 is an error. You'll need to look this up on your own and attempt to find a solution. We can't really help when it comes to server configuration issues or webhooks that fail due to your server unfortunately

topaz muralBOT
lime schooner
hoary lodge
#

Something is indeed causing it to send back a 502, so all I can really recommend is doing a network dump of the server logs and looking through them for clues if you don't have any leads at this point