- fix response error elang
This commit is contained in:
parent
fd5ee9655e
commit
d5d48480ee
|
@ -35,23 +35,15 @@ export const doTransaction = async (
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
// Handle error
|
// Handle error
|
||||||
if (e.error.includes('saldo tidak cukup')) {
|
console.log('inierrorelang', e)
|
||||||
throw new HttpException(
|
console.log('inierrorelang2', e.response.data)
|
||||||
{
|
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',
|
statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
|
||||||
},
|
error: e.error,
|
||||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
},
|
||||||
);
|
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||||
} else {
|
);
|
||||||
throw new HttpException(
|
|
||||||
{
|
|
||||||
statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
|
|
||||||
error: e.error,
|
|
||||||
},
|
|
||||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} else if (supplier.code == 'NIRS') {
|
} else if (supplier.code == 'NIRS') {
|
||||||
const res = await axios.get(
|
const res = await axios.get(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user