Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added logs to errors imports #259

Merged
merged 3 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions eox_core/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,21 @@
from eox_core.models import Redirection
from eox_core.utils import cache, fasthash

LOG = logging.getLogger(__name__)

try:
from eox_tenant.pipeline import EoxTenantAuthException
except ImportError:

class EoxTenantAuthException:
"""Dummy eox-tenant Exception."""

LOG.warning("ImportError while importing %s", EoxTenantAuthException)


configuration_helper = get_configuration_helper() # pylint: disable=invalid-name
ExceptionMiddleware = get_tpa_exception_middleware()

LOG = logging.getLogger(__name__)


class PathRedirectionMiddleware(MiddlewareMixin):
"""
Expand Down
5 changes: 5 additions & 0 deletions eox_core/settings/production.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
"""
Settings for eox_core project meant to be called on the edx-platform/*/envs/aws.py module
"""
import logging

from .common import * # pylint: disable=wildcard-import, unused-wildcard-import

LOG = logging.getLogger(__name__)

try:
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
except ImportError:
sentry_sdk = DjangoIntegration = None
LOG.error("ImportError while importing %s", ImportError)
BetoFandino marked this conversation as resolved.
Show resolved Hide resolved


def plugin_settings(settings): # pylint: disable=function-redefined
Expand Down
Loading