Skip to content

Commit fde36b4

Browse files
committed
improvement(emcn): fall back to generic reason for invalid email chips
1 parent ff9d494 commit fde36b4

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]
    • settings/components/credential-sets
    • w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat

apps/sim/app/workspace/[workspaceId]/settings/components/credential-sets/credential-sets.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ export function CredentialSets() {
136136

137137
setEmailItems((prev) => [
138138
...prev,
139-
{ value: normalized, isValid, error: isValid ? undefined : validation.reason },
139+
{
140+
value: normalized,
141+
isValid,
142+
error: isValid ? undefined : (validation.reason ?? 'Invalid email format'),
143+
},
140144
])
141145

142146
if (isValid) {

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ function AuthSelector({
657657
} else {
658658
setInvalidEmailItems((prev) => [
659659
...prev,
660-
{ value: normalized, isValid, error: validation.reason },
660+
{ value: normalized, isValid, error: validation.reason ?? 'Invalid email format' },
661661
])
662662
}
663663

0 commit comments

Comments
 (0)