Fix type errors

This commit is contained in:
2025-11-12 09:50:37 +02:00
parent 5ef7f58f5d
commit b216f7b211
2 changed files with 5 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ import { createBillingEventHandlerService } from './billing-event-handler.servic
type ClientProvider = () => SupabaseClient<Database>;
// the billing provider from the database
type BillingProvider = Enums<'billing_provider'>;
type BillingProvider = Enums<{ schema: 'medreport' }, 'billing_provider'>;
/**
* @name getBillingEventHandlerService

View File

@@ -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(