Skip to content

Commit

Permalink
Revert "chore(derived_code_mappings): Report errors with warning level (
Browse files Browse the repository at this point in the history
#76212)"

This reverts commit 491dd96.

Co-authored-by: armenzg <44410+armenzg@users.noreply.github.com>
  • Loading branch information
getsentry-bot and armenzg committed Aug 26, 2024
1 parent ab2a5ca commit 47dd90f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/sentry/integrations/github/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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

Expand All @@ -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"]
Expand Down

0 comments on commit 47dd90f

Please sign in to comment.