-
Notifications
You must be signed in to change notification settings - Fork 282
Revisit no-op behavior in generic email executor when service is not configured #2195
Description
Summary
The generic email executor currently complete as a no-op (with emailSent=false) when their respective notification service is not configured. This behavior was introduced to support the admin invite flow, which can operate in either a manual invite or an email invite mode — so the flow should not break if no email provider is set up.
However, this no-op design is not appropriate for all use cases. For example, in an email OTP registration/authentication flow, if the email cannot be sent, there is no way to verify the user, and the flow should fail rather than silently succeed.
Desired Behavior
A generic executor should not perform a no-op when the required service action cannot be performed. Instead, the admin invite flow use case (supporting both manual and email invite paths) should be handled by a dedicated prompt node that allows the flow designer to explicitly route the flow — e.g., prompting the admin to select either a manual invite path or an email invite path — rather than relying on silent no-op completion in the executor.
Affected Components
backend/internal/flow/executor/email_executor.go— no-op when email sender service is not configured
Context
This was raised during the review of PR #2128 (Add generic SMS executor for flow-based SMS sending): #2128 (comment)
Raised by: @ThaminduDilshan