From 704fad08954a61eda0a8c66ca5d321bf657a6fdc Mon Sep 17 00:00:00 2001 From: Muhammad Fadli Date: Fri, 21 Apr 2023 12:01:24 +0700 Subject: [PATCH] - fix error metro --- src/helper/irs-api.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helper/irs-api.ts b/src/helper/irs-api.ts index 002c0b1..b4e07a1 100644 --- a/src/helper/irs-api.ts +++ b/src/helper/irs-api.ts @@ -1,4 +1,5 @@ import axios from 'axios'; +import {NotFoundException} from "@nestjs/common"; const irs_url = 'http://h2h.elangpixiu.com/api/h2h'; const irs_id = 'PT0005'; @@ -140,6 +141,8 @@ export const doTransaction = async ( } catch (err) { console.log('errtransaction', err); console.log('errtransaction2', err.response.data); - throw 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali'; + throw new NotFoundException( + 'maaf saat ini transaksi sedang tidak bisa diproses, silahkan hubungi WND Solutions untuk bisa di proses kembali', + ); } };