From 47dd90f3eab332cee9ff183b02ad7a47e71e05c9 Mon Sep 17 00:00:00 2001 From: getsentry-bot Date: Mon, 26 Aug 2024 14:10:40 +0000 Subject: [PATCH] Revert "chore(derived_code_mappings): Report errors with warning level (#76212)" This reverts commit 491dd969fa146663739459d50eb8a7c15dd2a376. Co-authored-by: armenzg <44410+armenzg@users.noreply.github.com> --- src/sentry/integrations/github/client.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/sentry/integrations/github/client.py b/src/sentry/integrations/github/client.py index d09c066e92215..4c2591c433557 100644 --- a/src/sentry/integrations/github/client.py +++ b/src/sentry/integrations/github/client.py @@ -8,7 +8,6 @@ import orjson import sentry_sdk from requests import PreparedRequest -from sentry_sdk import capture_exception, capture_message from sentry.constants import ObjectStatus from sentry.integrations.github.blame import ( @@ -428,9 +427,7 @@ def _populate_trees_process_error(self, error: ApiError, extra: dict[str, str]) else: # We do not raise the exception so we can keep iterating through the repos. # Nevertheless, investigate the error to determine if we should abort the processing - capture_message( - "Continuing execution. Investigate: %s", error_message, extra=extra, level="warning" - ) + logger.error("Continuing execution. Investigate: %s", error_message, extra=extra) return should_count_error @@ -451,8 +448,7 @@ def _populate_trees(self, repositories: list[dict[str, str]]) -> dict[str, RepoT except ApiError: only_use_cache = True # Report so we can investigate - logger.warning("Loading trees from cache. Execution will continue. Check logs.") - capture_exception(level="warning") + logger.exception("Loading trees from cache. Execution will continue. Check logs.") for index, repo_info in enumerate(repositories): repo_full_name = repo_info["full_name"]