add error handler for payment request

This commit is contained in:
smanylov
2026-04-02 11:29:15 +07:00
parent 2878f546ee
commit 9b83ba3176
6 changed files with 16 additions and 7 deletions
+7
View File
@@ -378,6 +378,10 @@ export async function createPayoutRequest(
throw JSON.parse(responseText)?.message;
}
if (response.status === 409) {
throw 'insufficient-funds-to-receive-payment'
}
if (response.ok) {
const parsed = await response.json();
console.log(parsed);
@@ -403,6 +407,9 @@ export async function createPayoutRequest(
case 'Min sum for pay 1000':
typedError = 'min-sum-for-payout-1000';
break;
case 'insufficient-funds-to-receive-payment':
typedError = 'insufficient-funds-to-receive-payment';
break;
default:
typedError = 'payment-error';
}
@@ -550,7 +550,7 @@ export default function VerificationUploadSection({
</div>
</div>
{
{/* {
(fileType === 'image' && file.preview) && (
<div
className="image-preview-wrapper"
@@ -565,7 +565,7 @@ export default function VerificationUploadSection({
</div>
)
}
} */}
{
file.status === 'pending' && (
@@ -16,12 +16,12 @@ export default function SettingUserVerification() {
Верификация юзера
</h3>
<form>
{/* <VerificationUploadSection
{/* <VerificationUploadSection
fileType="image"
allowedExtensions={allFilesExtensions.images}
maxFileSize={allFilesExtensions.maxFileSize}
/> */}
{/* <button type="submit" className="btn btn-primary">
{/* <button type="submit" className="btn btn-primary">
загрузить
</button> */}
</form>