From c6e0e4460842218c8e16f9cf7b0861e629e36476 Mon Sep 17 00:00:00 2001 From: Muhammad Fadli Date: Fri, 21 Apr 2023 11:43:49 +0700 Subject: [PATCH] - fix error metro --- src/helper/irs-api.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helper/irs-api.ts b/src/helper/irs-api.ts index f9fd4e5..002c0b1 100644 --- a/src/helper/irs-api.ts +++ b/src/helper/irs-api.ts @@ -128,7 +128,11 @@ export const doTransaction = async ( ); console.log('restransini', res); console.log('restransini1', res.status); - return res.data; + if (res.data.includes('Saldo anda tidak mencukupi')) { + throw 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali'; + } else { + return res.data; + } } catch (e) { throw 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali'; }