Fix remaining catch blocks

This commit is contained in:
gpt-engineer-app[bot]
2025-10-21 17:08:24 +00:00
parent e9ae019285
commit 81fccdc4d0
10 changed files with 112 additions and 56 deletions

View File

@@ -28,7 +28,7 @@ class NotificationService {
.maybeSingle();
return !!data?.setting_value;
} catch (error) {
} catch (error: unknown) {
logger.error('Failed to check Novu status', {
action: 'check_novu_status',
error: error instanceof Error ? error.message : String(error)
@@ -80,7 +80,7 @@ class NotificationService {
});
return { success: true };
} catch (error) {
} catch (error: unknown) {
logger.error('Error in updateSubscriber', {
action: 'update_novu_subscriber',
userId: subscriberData.subscriberId,
@@ -162,7 +162,7 @@ class NotificationService {
});
return { success: true };
} catch (error) {
} catch (error: unknown) {
logger.error('Error in createSubscriber', {
action: 'create_novu_subscriber',
userId: subscriberData.subscriberId,
@@ -258,7 +258,7 @@ class NotificationService {
});
return { success: true };
} catch (error) {
} catch (error: unknown) {
logger.error('Error updating notification preferences', {
action: 'update_notification_preferences',
userId,
@@ -314,7 +314,7 @@ class NotificationService {
workflowPreferences: data.workflow_preferences,
frequencySettings: data.frequency_settings
});
} catch (error) {
} catch (error: unknown) {
logger.error('Error fetching notification preferences', {
action: 'fetch_notification_preferences',
userId,
@@ -345,7 +345,7 @@ class NotificationService {
}
return data || [];
} catch (error) {
} catch (error: unknown) {
logger.error('Error fetching notification templates', {
action: 'fetch_notification_templates',
error: error instanceof Error ? error.message : String(error)
@@ -394,7 +394,7 @@ class NotificationService {
});
return { success: true };
} catch (error) {
} catch (error: unknown) {
logger.error('Error triggering notification', {
action: 'trigger_notification',
workflowId: payload.workflowId,
@@ -439,7 +439,7 @@ class NotificationService {
submissionId: payload.submission_id,
requestId
});
} catch (error) {
} catch (error: unknown) {
logger.error('Error notifying moderators', {
action: 'notify_moderators',
submissionId: payload.submission_id,