diff --git a/packages/syft/src/syft/service/notifier/notifier_service.py b/packages/syft/src/syft/service/notifier/notifier_service.py index c27089d2445..f1ba8f060b6 100644 --- a/packages/syft/src/syft/service/notifier/notifier_service.py +++ b/packages/syft/src/syft/service/notifier/notifier_service.py @@ -238,7 +238,7 @@ def init_notifier( email_sender: str | None = None, smtp_port: int | None = None, smtp_host: str | None = None, - ) -> SyftSuccess: + ) -> SyftSuccess | None: """Initialize Notifier settings for a Server. If settings already exist, it will use the existing one. If not, it will create a new one. @@ -258,13 +258,13 @@ def init_notifier( logger.error( "SMTP server and port are required to initialize the notifier." ) - return + return None if not email_username and not email_password: logger.error( "Email username and password are required to initialize the notifier." ) - return + return None try: # Create a new NotifierStash since its a static method.