feat(errors): add centralized exception handling
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { ExceptionHandler } from "@/core/errors";
|
||||
import { PaymentPlan, type PaymentPlansResponse } from "@/data/dto/payment";
|
||||
|
||||
import type { PaymentState } from "./payment-state";
|
||||
@@ -7,7 +8,7 @@ export const PAYMENT_TIMEOUT_ERROR_MESSAGE =
|
||||
"Payment timed out. Please try again.";
|
||||
|
||||
export function toPaymentErrorMessage(error: unknown): string {
|
||||
return error instanceof Error ? error.message : String(error);
|
||||
return ExceptionHandler.message(error);
|
||||
}
|
||||
|
||||
export function hasOrderPollingTimedOut(
|
||||
|
||||
Reference in New Issue
Block a user