Skip to content

fix(integrations): Prevent TypeError when integration provider is undefined#120634

Draft
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/integrations-provider-key-typeerror
Draft

fix(integrations): Prevent TypeError when integration provider is undefined#120634
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/integrations-provider-key-typeerror

Conversation

@sentry

@sentry sentry Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

This PR addresses a TypeError: Cannot read properties of undefined (reading 'key') occurring in static/app/views/settings/organizationIntegrations/configureIntegration.tsx at line 97.

The original code integration?.provider.key used optional chaining only for the integration object. If integration was defined but its provider property was undefined, attempting to access .key on undefined would throw a TypeError.

The fix involves adding optional chaining to integration.provider as well, changing the expression to integration?.provider?.key. This ensures that if integration.provider is undefined, the expression safely short-circuits to undefined instead of throwing an error.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes JAVASCRIPT-38KX

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants