File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -849,11 +849,14 @@ def generate_email_action_link(
849849 FirebaseError: If an error occurs while generating the link
850850 ValueError: If the provided arguments are invalid
851851 """
852- if action_type == 'VERIFY_AND_CHANGE_EMAIL' and not new_email :
852+ if action_type == 'VERIFY_AND_CHANGE_EMAIL' :
853+ if not new_email :
854+ raise ValueError (
855+ 'new_email must be provided when action_type is VERIFY_AND_CHANGE_EMAIL.' )
856+ elif new_email :
853857 raise ValueError (
854- 'new_email must be provided when action_type is VERIFY_AND_CHANGE_EMAIL.'
855- )
856-
858+ 'new_email is only supported for the VERIFY_AND_CHANGE_EMAIL action type.' )
859+
857860 payload = {
858861 'requestType' : _auth_utils .validate_action_type (action_type ),
859862 'email' : _auth_utils .validate_email (email , required = True ),
You can’t perform that action at this time.
0 commit comments