From b216f7b21145b4326cc7f94db85b7ce76eab7435 Mon Sep 17 00:00:00 2001 From: Karli Date: Wed, 12 Nov 2025 09:50:37 +0200 Subject: [PATCH] Fix type errors --- .../billing-event-handler-provider.ts | 2 +- .../services/webhooks/order-notifications.service.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/billing/gateway/src/server/services/billing-event-handler/billing-event-handler-provider.ts b/packages/billing/gateway/src/server/services/billing-event-handler/billing-event-handler-provider.ts index 47cb1d1..c792b76 100644 --- a/packages/billing/gateway/src/server/services/billing-event-handler/billing-event-handler-provider.ts +++ b/packages/billing/gateway/src/server/services/billing-event-handler/billing-event-handler-provider.ts @@ -12,7 +12,7 @@ import { createBillingEventHandlerService } from './billing-event-handler.servic type ClientProvider = () => SupabaseClient; // the billing provider from the database -type BillingProvider = Enums<'billing_provider'>; +type BillingProvider = Enums<{ schema: 'medreport' }, 'billing_provider'>; /** * @name getBillingEventHandlerService diff --git a/packages/features/notifications/src/server/services/webhooks/order-notifications.service.ts b/packages/features/notifications/src/server/services/webhooks/order-notifications.service.ts index 393eb9c..f41cebd 100644 --- a/packages/features/notifications/src/server/services/webhooks/order-notifications.service.ts +++ b/packages/features/notifications/src/server/services/webhooks/order-notifications.service.ts @@ -74,14 +74,14 @@ class OrderWebhooksService { } logger.info(ctx, 'Status change processed. No notifications to send.'); - } catch (e: any) { + } catch (e) { if (actions.length) await Promise.all( actions.map((action) => createNotificationLog({ action, status: 'FAIL', - comment: e?.message, + comment: e instanceof Error ? e.message : 'Unknown error', relatedRecordId: analysisOrder.id, }), ), @@ -201,11 +201,11 @@ class OrderWebhooksService { status: 'SUCCESS', relatedRecordId: orderCart.order_id, }); - } catch (e: any) { + } catch (e) { createNotificationLog({ action: NotificationAction.TTO_ORDER_CONFIRMATION, status: 'FAIL', - comment: e?.message, + comment: e instanceof Error ? e.message : 'Unknown error', relatedRecordId: ttoReservation.id, }); logger.error(