#tomas_code
1 messages ¡ Page 1 of 1 (latest)
đ 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/1291362128212787254
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
I'm not sure I follow. are you saying that this call sometimes work, sometimes return an object with an error, and sometimes throw an error?
and what exactly is the issue?
Sometimes this call works. Sometimes instead of throwing an error, GetAsync returns successfully but with an error body instead of a legit Stripe response object
can you share the error body you received?
In our logs, we can only see that the paymentMethod.StripeResponse.Content is 'Stripe.StripeException, Stripe.net'
Hey! Taking over for my colleague. Let me catch up.
Could you please share the complete Stacktrace of the error ?
The error is "Error resolving type specified in JSON 'Stripe.StripeException, Stripe.net'" in this method: public PaymentMethodDto DeserializeStripeResponse(string stripeResponseContent)
{
try
{
return JsonConvert.DeserializeObject<PaymentMethodDto>(stripeResponseContent);
}
catch (JsonException ex)
{
_logger.LogError(ex, "Error deserializing Stripe response: {Message}", ex.Message);
return new PaymentMethodDto()
{
Object = stripeResponseContent
};
}
} where we get Stripe response content via var paymentMethod = await _paymentMethodService.GetAsync(paymentMethodId); The GetAsync does not throw an error in this case
And what was the answer you got from Stripe API call ?
Please share the complete Stacktrace.