#Gauri - error codes
1 messages · Page 1 of 1 (latest)
Unfortunately not, some just return the fact that there is an error and an error message
If you are running in to an error without a code, I can put in a feature request to add one though I can't promise it will be added
we wanted to catch the error codes and localize it accordingly
The error message should be localized, the error code will always be in english
So you will always get the error code payment_method_currency_mismatch for currency mismatches, but the message will be translated if we know where the customer is
Or, are you talking about using your own custom strings to communicate the errors to customers?
Yeah we have multiple languages.. we are using custom code to translate the error messages.. I wanted to use the code and add lcoalize the message as per the need
Can you enlighthen me how stripe is localizing the message ?
Understood. Is there currently an error that you are running in to that does not have an error code for you to code something to?
For frontend code, Stripe uses the browser's locale. For backend errors we typically use your account's language I believe but I will have to double check that
Yeah for eg:
Gotcha. I can put in a feature request to add an error code there
Though that is a backend error that would not be useful to a customer. Are you looking to localize it for your own staff?
How do I differenciate between backend and frontend errors?.. we are logging the errors but some times user's are annoyed as we do not display what is the exact error for the transaction failures
What API call are you making when you get that error?
update subscription
The reason I call it a backend error is entirely that it is happening on your server. Some of those errors can be useful to show to your users if the error is about a payment that they are making, but in your screenshot that looks like that is setting up a page for the user to pay on.
We can look in to that error too on this server after discussing the localization if you would like .
The error is when the user is trying to update the quantites of subscription
Can you send me the request ID for that? That should not be the error that you get back from trying to update quantities
I know how to fix this error.. I only wanted to know about the localization.. My concern is about displaying the message to the customers
Is there a way for us to diffrenciate backend and frontend error's?
Thanks for your help @gaunt wing I will discuss this with our team and get back if I need more help