Skip to content
Draft
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
8 changes: 8 additions & 0 deletions src/sentry/integrations/utils/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from sentry import options
from sentry.exceptions import RestrictedIPAddress
from sentry.shared_integrations.exceptions import ApiInvalidRequestError
from sentry.integrations.base import IntegrationDomain
from sentry.integrations.types import EventLifecycleOutcome
from sentry.utils import metrics
Expand Down Expand Up @@ -362,6 +363,13 @@ def __exit__(
# ApiHostError is raised from RestrictedIPAddress
self.record_halt(exc_value)
return
if exc_value is not None and isinstance(exc_value, ApiInvalidRequestError):
# A 400 Bad Request from the integration proxy indicates invalid/expired
# credentials or a misconfigured installation. This is a known condition
# handled gracefully by callers, so treat it as a halt rather than a
# failure that generates a Sentry issue.
self.record_halt(exc_value)
return
super().__exit__(exc_type, exc_value, traceback)


Expand Down
Loading