Skip to content

Commit 9364982

Browse files
committed
Catch OrganizationIntegrationNotFound
1 parent 5e14fb7 commit 9364982

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sentry/scm/private/helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from scm.types import Provider, Repository, RepositoryId
88

99
from sentry.constants import ObjectStatus
10+
from sentry.integrations.errors import OrganizationIntegrationNotFound
1011
from sentry.integrations.services.integration.service import integration_service
1112
from sentry.models.repository import Repository as RepositoryModel
1213
from sentry.scm.private.rate_limit import RedisRateLimitProvider
@@ -28,7 +29,7 @@ def fetch_service_provider(
2829

2930
try:
3031
client = integration.get_installation(organization_id=organization_id).get_client()
31-
except IntegrationError:
32+
except (IntegrationError, OrganizationIntegrationNotFound):
3233
return None
3334

3435
if integration.provider == "github":

0 commit comments

Comments
 (0)