fix payout error handler

This commit is contained in:
smanylov
2026-04-09 14:45:20 +07:00
parent 3a6034a460
commit 2af7c12cf6
3 changed files with 9 additions and 0 deletions
+7
View File
@@ -385,6 +385,10 @@ export async function createPayoutRequest(
if (responseText.includes('Not have money for payout')) {
throw 'insufficient-funds-to-receive-payment'
}
if (responseText.includes('Not found payout method')) {
throw 'not-found-payout-method'
}
}
if (response.ok) {
@@ -415,6 +419,9 @@ export async function createPayoutRequest(
case 'insufficient-funds-to-receive-payment':
typedError = 'insufficient-funds-to-receive-payment';
break;
case 'not-found-payout-method':
typedError = 'not-found-payout-method';
break
default:
typedError = 'payment-error';
}
+1
View File
@@ -392,6 +392,7 @@
"text-area-error-fill-complaint-text": "Fill out the complaint text",
"to-view-a-file-match-click-on-the-card-from-the-list": "To view a file match, click on the card from the list",
"insufficient-funds-to-receive-payment": "Insufficient funds to receive payment",
"not-found-payout-method": "Not found payout method",
"failed-to-delete-bank-card": "Failed to delete bank card",
"bank-card-has-been-successfully-deleted": "The bank card has been successfully deleted",
"linked-bank-cards": "Linked bank cards",
+1
View File
@@ -392,6 +392,7 @@
"text-area-error-fill-complaint-text": "Заполните текст жалобы",
"to-view-a-file-match-click-on-the-card-from-the-list": "Для просмотра совпадения по файлу нажмите на карточку из списка",
"insufficient-funds-to-receive-payment": "Недостаточно средств для получения выплаты",
"not-found-payout-method": "Метод выплаты не найден",
"failed-to-delete-bank-card": "Не удалось удалить банковскую карту",
"bank-card-has-been-successfully-deleted": "Банковская карта успешно удалена",
"linked-bank-cards": "Привязанные банковские карты",