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';
}