Fix: Handle internal errors

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 02:41:01 +00:00
parent 9e8e8719b4
commit 07420a67bf
6 changed files with 24 additions and 19 deletions

View File

@@ -344,7 +344,12 @@ class NotificationService {
throw error;
}
return data || [];
return (data || []).map(t => ({
...t,
is_active: t.is_active ?? true,
description: t.description || undefined,
novu_workflow_id: t.novu_workflow_id || undefined
}));
} catch (error: unknown) {
logger.error('Error fetching notification templates', {
action: 'fetch_notification_templates',