From 2dfe60ab4b41ee576e134664e828243d4c5b8377 Mon Sep 17 00:00:00 2001 From: tba76 Date: Mon, 13 Nov 2023 13:40:34 +0100 Subject: [PATCH 1/3] New send-status for invalid email format --- .../Enums/EmailNotificationResultType.cs | 7 ++++++- .../Migration/v0.10/01-alter-enum.sql | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/Altinn.Notifications.Persistence/Migration/v0.10/01-alter-enum.sql diff --git a/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs b/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs index 06714d28..69d753cd 100644 --- a/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs +++ b/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs @@ -28,5 +28,10 @@ public enum EmailNotificationResultType /// /// Recipient to address was not identified /// - Failed_RecipientNotIdentified + Failed_RecipientNotIdentified, + + /// + /// Invalid format for email address + /// + Failed_InvalidEmailFormat } diff --git a/src/Altinn.Notifications.Persistence/Migration/v0.10/01-alter-enum.sql b/src/Altinn.Notifications.Persistence/Migration/v0.10/01-alter-enum.sql new file mode 100644 index 00000000..548762fe --- /dev/null +++ b/src/Altinn.Notifications.Persistence/Migration/v0.10/01-alter-enum.sql @@ -0,0 +1 @@ +ALTER TYPE emailnotificationresulttype ADD VALUE IF NOT EXISTS 'Failed_InvalidEmailFormat'; From 37ec91a31058deab107cbfe8cdcef973f37d3b8c Mon Sep 17 00:00:00 2001 From: tba76 Date: Mon, 13 Nov 2023 14:42:48 +0100 Subject: [PATCH 2/3] Add status for unknown errors --- .../Enums/EmailNotificationResultType.cs | 7 ++++++- .../Migration/v0.11/01-alter-enum.sql | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/Altinn.Notifications.Persistence/Migration/v0.11/01-alter-enum.sql diff --git a/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs b/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs index 69d753cd..835d01d3 100644 --- a/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs +++ b/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs @@ -33,5 +33,10 @@ public enum EmailNotificationResultType /// /// Invalid format for email address /// - Failed_InvalidEmailFormat + Failed_InvalidEmailFormat, + + /// + /// Failed, unknown reason + /// + Failed } diff --git a/src/Altinn.Notifications.Persistence/Migration/v0.11/01-alter-enum.sql b/src/Altinn.Notifications.Persistence/Migration/v0.11/01-alter-enum.sql new file mode 100644 index 00000000..52aab181 --- /dev/null +++ b/src/Altinn.Notifications.Persistence/Migration/v0.11/01-alter-enum.sql @@ -0,0 +1 @@ +ALTER TYPE emailnotificationresulttype ADD VALUE IF NOT EXISTS 'Failed'; From fd22ee458a01601c8d5060decd15810c66fdbfda Mon Sep 17 00:00:00 2001 From: tba76 Date: Mon, 13 Nov 2023 14:49:23 +0100 Subject: [PATCH 3/3] Update after SB comment --- .../Enums/EmailNotificationResultType.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs b/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs index 835d01d3..65813841 100644 --- a/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs +++ b/src/Altinn.Notifications.Core/Enums/EmailNotificationResultType.cs @@ -26,17 +26,17 @@ public enum EmailNotificationResultType Delivered, /// - /// Recipient to address was not identified + /// Failed, unknown reason /// - Failed_RecipientNotIdentified, + Failed, /// - /// Invalid format for email address + /// Recipient to address was not identified /// - Failed_InvalidEmailFormat, + Failed_RecipientNotIdentified, /// - /// Failed, unknown reason + /// Invalid format for email address /// - Failed + Failed_InvalidEmailFormat }