Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(integrations): Integration ID TypeError #28916

Merged
merged 2 commits into from
Sep 29, 2021
Merged

fix(integrations): Integration ID TypeError #28916

merged 2 commits into from
Sep 29, 2021

Conversation

mgaeta
Copy link
Contributor

@mgaeta mgaeta commented Sep 28, 2021

The app was crashing while trying to turn an optional parameter into an int.

Fixes SENTRY-SA9.

@mgaeta mgaeta requested a review from a team September 28, 2021 21:14
@mgaeta mgaeta changed the title fix(integrations): Catch ValueError fix(integrations): Integration ID TypeError Sep 28, 2021
@@ -37,15 +37,20 @@ def clean(self):
cleaned_data = super().clean()

integration_id = cleaned_data.get("account")
try:
integration_id = int(integration_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t this be a validation error?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDIT: I guess this is optional but we should still give a validation error if the param is given and it’s not an int

@mgaeta mgaeta merged commit 1a8ea9c into master Sep 29, 2021
@mgaeta mgaeta deleted the fix/sentry-sa9 branch September 29, 2021 17:35
@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants