#redapse_docs

1 messages · Page 1 of 1 (latest)

robust boneBOT
#

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

📝 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.

gleaming galleon
#

hey there, sorry for the delay!

#

Can you share an example of the context where you receive that?

#

It sounds like a front end validation of a card payment method input, not an API error

humble tusk
#

yes correct, its frontend

#

i didn't know you have separate frontend and api errors

gleaming galleon
#

If you're using the payment element, the details of those card errors should be surfaced directly in the element already

humble tusk
#

yeah we have a custom integration we're building, and need to map the errors to an enum of ours

gleaming galleon
#

If you want to guard againt customers attempting to pay before completing fields, you can add a listener on the change event and inspect the complete attribute

humble tusk
#

its not an issue with the validation, i simply just need a complete list of all of the errors (perhaps github?)

gleaming galleon
#

How are you integrating, exactly, and again whats the context in which you get this?

#

We don't necessarily have all those potential validation messages enumerated

humble tusk
#

you definitely have them enumerated, it's an error code

#

its from stripe elements

#

I'm building a blazor webassembly integration with a strong typed enum.. and just want the list of all of your error codes

idk why that would be an issue

gleaming galleon
humble tusk
#

I don't enter the entire number in the stripe payment element card number, and then call Submit()

gleaming galleon
#

ok

#

so this is validation on submit/confirm attempts

#

this is all just validation_error with additional detail:

{
    "code": "incomplete_number",
    "type": "validation_error",
    "message": "Your card number is incomplete.",
    "extra_fields": {
        "localized": true
    }
}
#

There is no enumeration of the code values used there, as these are handled internally for Stripe.js. You need only capture the type=validation_error here.

#

That said, I can raise this feedback that you'll like more detail about the possible code values to be documented

humble tusk
#

ok, is the documentation missing the error code or am i missing something

#

I think what you're saying is the code comes from the stripe servers; i'm just concerned i'm not understanding something, (for example, are there different frontend vs api error codes?)

gleaming galleon
#

(for example, are there different frontend vs api error codes?)
this, sort of

#

these are local validations within Stripe.js

#

they are not API errors

#

We don't even attempt the actual confirmation request when the card number is incomplete, for example, since that will never succeed

humble tusk
#

totally makes sense

#

it seems like the result from these promises in stripe.js are merging local validation errors with api server errors then

#

and you're saying they aren't enumerated, they are constructed during runtime?

gleaming galleon
#

They're enumerated within Stripe.js, but not publicly in docs/types because its not currently a public contract

#

Only the validation error type is explicit

robust boneBOT
humble tusk
#

do you happen to have a link to where they are enumerated?

I can't find them in the stripe.js repo

cursive mango
#

I'm having trouble finding this, will reach out to my colleagues for help and will get back with what we can find

#

Unfortunately I am not finding this enumerated in any of our public repos for Stripe.js. I don't think we have a ready-made thing with every error that stripe.js can throw at the moment

#

Can you tell me more about what you are trying to do with the list of potential error codes?

humble tusk
#

I'm trying to map them to a hard typed enumeration within C#