diff --git a/packages/syft/src/syft/service/notifier/notifier_service.py b/packages/syft/src/syft/service/notifier/notifier_service.py index 464581a940f..391bf16abd4 100644 --- a/packages/syft/src/syft/service/notifier/notifier_service.py +++ b/packages/syft/src/syft/service/notifier/notifier_service.py @@ -208,8 +208,8 @@ def turn_on( settings_service = context.server.get_service("settingsservice") result = settings_service.update(context, notifications_enabled=True) - if result.is_err(): - logger.info(f"Failed to update Server Settings: {result.err()}") + if isinstance(result, SyftError): + logger.info(f"Failed to update Server Settings: {result.message}") return SyftSuccess(message="Notifications enabled successfully.") @@ -235,8 +235,8 @@ def turn_off( settings_service = context.server.get_service("settingsservice") result = settings_service.update(context, notifications_enabled=False) - if result.is_err(): - logger.info(f"Failed to update Server Settings: {result.err()}") + if isinstance(result, SyftError): + logger.info(f"Failed to update Server Settings: {result.message}") return SyftSuccess(message="Notifications disabled succesfullly")