Fix type errors
This commit is contained in:
@@ -12,7 +12,7 @@ import { createBillingEventHandlerService } from './billing-event-handler.servic
|
|||||||
type ClientProvider = () => SupabaseClient<Database>;
|
type ClientProvider = () => SupabaseClient<Database>;
|
||||||
|
|
||||||
// the billing provider from the database
|
// the billing provider from the database
|
||||||
type BillingProvider = Enums<'billing_provider'>;
|
type BillingProvider = Enums<{ schema: 'medreport' }, 'billing_provider'>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name getBillingEventHandlerService
|
* @name getBillingEventHandlerService
|
||||||
|
|||||||
@@ -74,14 +74,14 @@ class OrderWebhooksService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
logger.info(ctx, 'Status change processed. No notifications to send.');
|
logger.info(ctx, 'Status change processed. No notifications to send.');
|
||||||
} catch (e: any) {
|
} catch (e) {
|
||||||
if (actions.length)
|
if (actions.length)
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
actions.map((action) =>
|
actions.map((action) =>
|
||||||
createNotificationLog({
|
createNotificationLog({
|
||||||
action,
|
action,
|
||||||
status: 'FAIL',
|
status: 'FAIL',
|
||||||
comment: e?.message,
|
comment: e instanceof Error ? e.message : 'Unknown error',
|
||||||
relatedRecordId: analysisOrder.id,
|
relatedRecordId: analysisOrder.id,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
@@ -201,11 +201,11 @@ class OrderWebhooksService {
|
|||||||
status: 'SUCCESS',
|
status: 'SUCCESS',
|
||||||
relatedRecordId: orderCart.order_id,
|
relatedRecordId: orderCart.order_id,
|
||||||
});
|
});
|
||||||
} catch (e: any) {
|
} catch (e) {
|
||||||
createNotificationLog({
|
createNotificationLog({
|
||||||
action: NotificationAction.TTO_ORDER_CONFIRMATION,
|
action: NotificationAction.TTO_ORDER_CONFIRMATION,
|
||||||
status: 'FAIL',
|
status: 'FAIL',
|
||||||
comment: e?.message,
|
comment: e instanceof Error ? e.message : 'Unknown error',
|
||||||
relatedRecordId: ttoReservation.id,
|
relatedRecordId: ttoReservation.id,
|
||||||
});
|
});
|
||||||
logger.error(
|
logger.error(
|
||||||
|
|||||||
Reference in New Issue
Block a user