#smartge3k_code

1 messages ยท Page 1 of 1 (latest)

wide burrowBOT
#

๐Ÿ‘‹ 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/1230155417141772428

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

dark gorgeBOT
prime furnace
#

Hello
That seems like an issue with your web server?
Are there any additional logs?

pine sapphire
#

I also thought it is something to do with the web server but i face it locally as well

prime furnace
#

I mean if you're running the same code on both, then it would affect both.
Are there any additional logs?

pine sapphire
#

No, I only get this error. I try to catch the error but error is not catched as well. If I look at the logs, I see "done" printed on console and nothing else.
try {
await this.subscriptionPaid(eventObject);

    console.log(done);
    await this.stripeClient.subscriptions.update(eventObject.id, {
      metadata: {
        keySent: 'true',
      },
    });
    console.log('successfully sent key sent trye to subscription update');
  } catch (e) {
    console.log('error sending event to stripe', e);
  }
#

moreover, I see this message on the stripe but none of my keys are expired.

#

but this message has nothing to do with my problem because I do not do anything with the customers update. I only listen to this webhook and do not send anything in return

prime furnace
#

@pine sapphire you're likely in someone else's thread

pine sapphire
#

oh sorry, my bad. I got notification and did not notice.

#

@prime furnace are you looking at my problem? sorry, it has been ~10 minutes

dark gorgeBOT
prime furnace
#

Server is running a bit busy, appreciate your patience

pine sapphire
#

no worries

weary granite
#

Hello ๐Ÿ‘‹ catching up in this thread and can help in a minute

pine sapphire
#

Thank you

weary granite
#

Can you send me the link to your dashboard page where you see that error?

#

Will see if I can see info about what API key we saw for that

pine sapphire
#

which error?

#

the warning about api_key expired??

#

this is one of the event which has problem for connection refused.

weary granite
#

Thank you, still looking in to this, will get back with what I can find.

pine sapphire
#

thank you

weary granite
#

I'm sorry but I'm not able to see that error message around those events at all. Can you tell me more about where that error is showing up for you in the dashboard?

#

Also can you send me the text of that /v1/customers/cus_... path? That may be able to help me find these calls

pine sapphire
#

are you refering to the screenshot I sent you?

weary granite
#

Also just debugging-wise, can you try making another call with that same API key to see if you get the same error?

#

Correct

pine sapphire
#

I see it in the /developers

#

Ok I ran retrieve customer query and it fetched the result successfully but not working with the subscription update request

weary granite
pine sapphire
#

req_22XgWyxWLUKDLA

weary granite
#

I am still having trouble finding what is happening here. I will consult my colleagues on this and get back to you with what we can find

pine sapphire
#

but do you understand my problem? i send the update event, stripe refused it

#

but retrieval worked fine.

weary granite
#

I was just rereading. That first error is from your server, this separate error about the API key being expired when you make update calls is what we are looking in to now correct?

pine sapphire
#

the server side error.

#

and why I see the message that api key is expired as none of they keys are expired on stripe

weary granite
#

Just to double check, can you copy in a different secret key to see if that doesn't get the error?

#

Even if the key isn't expired I am curious if this is key specific

pine sapphire
#

I only have one key

#

for every subscription.update request to stripe (production or local) i get mentioned error. this is my problem

#

Ok, I think this has something to do with my code. Thank you for your help.

weary granite
#

Interesting, can you tell me more about what you found?

#

Huh, I am actually seeing a different API key being used for the api_key_expired calls that I'm seeing on my side