diff --git a/authentik/core/tasks.py b/authentik/core/tasks.py index 99307f8a1..8a2f2d372 100644 --- a/authentik/core/tasks.py +++ b/authentik/core/tasks.py @@ -75,5 +75,6 @@ def backup_database(self: MonitoredTask): # pragma: no cover Boto3Error, PermissionError, CommandConnectorError, + ValueError, ) as exc: self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc)) diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index 79a7b0d53..7ef05158f 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -4,6 +4,7 @@ from typing import Optional from aioredis.errors import ConnectionClosedError, ReplyError from billiard.exceptions import WorkerLostError from botocore.client import ClientError +from botocore.exceptions import BotoCoreError from celery.exceptions import CeleryError from channels.middleware import BaseMiddleware from channels_redis.core import ChannelFull @@ -72,6 +73,7 @@ def before_send(event: dict, hint: dict) -> Optional[dict]: WorkerLostError, CeleryError, # S3 errors + BotoCoreError, ClientError, # custom baseclass SentryIgnoredException, @@ -87,6 +89,6 @@ def before_send(event: dict, hint: dict) -> Optional[dict]: if isinstance(exc_value, ignored_classes): return None if "logger" in event: - if event["logger"] in ["dbbackup"]: + if event["logger"] in ["dbbackup", "botocore"]: return None return event