Skip to content

Commit

Permalink
fix: payment error message when multiple errors are received after cr…
Browse files Browse the repository at this point in the history
…eating a payment instrument (#491)
  • Loading branch information
harshrsys authored Jan 4, 2021
1 parent a43d4cb commit 2c54961
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const createPaymentErrorHandler: SpecialHttpErrorHandler = {
test: (error, request) => error.url.endsWith('/payments') && request.method === 'POST',
map: error => {
if (error?.error && error.error.includes('{') && error.error.includes('}')) {
return { code: error.error.slice(error.error.indexOf('{') + 1, error.error.lastIndexOf('}')) };
return { code: error.error.slice(error.error.indexOf('{') + 1, error.error.indexOf('}')) };
}
},
};
2 changes: 1 addition & 1 deletion src/assets/i18n/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@
"order.number.label": "Bestellnummer:",
"order.tracking.error": "Leider konnte keine Bestellung mit Ihren Daten gefunden werden.",
"order_template.create.heading": "Bestellvorlage anlegen",
"payment.error.PaymentInstrumentAlreadyExists": "Ein Zahlungsmittel mit den angegebenen Parametern existiert bereits.",
"payment.error.PaymentInstrumentAlreadyExists": "Das Zahlungsmittel konnte nicht angelegt werden. Zahlungsdaten mit den angegebenen Parametern sind bereits vorhanden.",
"product.add_to_cart.link": "In den Warenkorb",
"product.add_to_cart.retailset.link": "Artikel in den Warenkorb legen",
"product.add_to_wishlist.link": "Auf die Wunschliste",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@
"order.number.label": "Order Number:",
"order.tracking.error": "Unfortunately, we could not locate an order with the information you provided.",
"order_template.create.heading": "Create Order Template",
"payment.error.PaymentInstrumentAlreadyExists": "A payment instrument with the given parameters already exists.",
"payment.error.PaymentInstrumentAlreadyExists": "The payment instrument could not be created. Payment data with the given parameters already exists.",
"product.add_to_cart.link": "Add to Cart",
"product.add_to_cart.retailset.link": "Add item(s) to Cart",
"product.add_to_wishlist.link": "Add to Wish List",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@
"order.number.label": "Numéro de commande :",
"order.tracking.error": "Malheureusement, nous n’avons pas pu localiser de commande avec les informations que vous nous avez fournies.",
"order_template.create.heading": "Créer un modèle de commande",
"payment.error.PaymentInstrumentAlreadyExists": "L’instrument de paiement avec les paramètres donnés existe déjà.",
"payment.error.PaymentInstrumentAlreadyExists": "L’instrument de paiement n’a pas pu être créé. Les données de paiement avec les paramètres fournis existent déjà.",
"product.add_to_cart.link": "Ajouter au panier",
"product.add_to_cart.retailset.link": "Ajouter les articles au panier",
"product.add_to_wishlist.link": "Ajouter à la liste de souhaits",
Expand Down

0 comments on commit 2c54961

Please sign in to comment.