Merge branch 'development' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into devops-staging

This commit is contained in:
Muhammad Fadli 2023-04-21 12:12:35 +07:00
commit 970bda1f84

View File

@ -130,12 +130,24 @@ export const doTransaction = async (
console.log('restransini', res);
console.log('restransini1', res.status);
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';
throw new HttpException(
{
statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
error: 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali',
},
HttpStatus.INTERNAL_SERVER_ERROR,
);
} else {
return res.data;
}
} catch (e) {
throw 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali';
throw new HttpException(
{
statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
error: 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali',
},
HttpStatus.INTERNAL_SERVER_ERROR,
);
}
} catch (err) {