From 2e7293ca99bb52a348eae11bd866e752324fc0c8 Mon Sep 17 00:00:00 2001 From: G Date: Tue, 28 May 2024 10:43:36 +0000 Subject: [PATCH] update error name to match general javascript errors --- src/utils/requests/orangePayment.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/requests/orangePayment.ts b/src/utils/requests/orangePayment.ts index 1f6825f..58933a6 100644 --- a/src/utils/requests/orangePayment.ts +++ b/src/utils/requests/orangePayment.ts @@ -65,13 +65,13 @@ export const getTransactionStatus = async (orderId: string) => { if (response.status === "INITIATED") { log.warn("Payment is still in progress, throwing error for mutation to catch"); const error = new Error("Payment is still in progress"); - error.name = "PaymentInProgress"; + error.name = "ORANGE_PAYMENT_IN_PROGRESS"; throw error; } if (response.status === "FAILED") { log.warn("Payment failed, throwing error for mutation to catch"); const error = new Error("Payment failed"); - error.name = "PaymentFailed"; + error.name = "ORANGE_PAYMENT_FAILED"; throw error; } log.http("getTransactionStatus |", JSON.stringify(response, null, 2)); -- libgit2 0.27.1