Browse Source

chore(derived_code_mappings): Do not report these errors (#44683)

Fixes [SENTRY-Z1N](https://sentry.sentry.io/issues/3939446058)
Armen Zambrano G 2 years ago
parent
commit
05199569ee
1 changed files with 11 additions and 0 deletions
  1. 11 0
      src/sentry/tasks/derive_code_mappings.py

+ 11 - 0
src/sentry/tasks/derive_code_mappings.py

@@ -90,6 +90,17 @@ def derive_code_mappings(
             logger.warning("The org has uninstalled the Sentry App.", extra=extra)
             return
 
+        if msg == "This installation has been suspended":
+            logger.warning("The org has suspended the Sentry App.", extra=extra)
+            return
+
+        if msg.startswith("Although you appear to have the correct authorization credentials"):
+            # Although you appear to have the correct authorization credentials, the
+            # <github_org_here> organization has an IP allow list enabled, and
+            # <ip_address_here> is not permitted to access this resource.
+            logger.warning("The org has suspended the Sentry App. See code comment.", extra=extra)
+            return
+
         # Logging the exception and returning is better than re-raising the error
         # Otherwise, API errors would not group them since the HTTPError in the stack
         # has unique URLs, thus, separating the errors