fix(sentry_apps): correct 'occured' -> 'occurred' in SentryAppError comments and message#113058
Open
SAY-5 wants to merge 1 commit intogetsentry:masterfrom
Open
fix(sentry_apps): correct 'occured' -> 'occurred' in SentryAppError comments and message#113058SAY-5 wants to merge 1 commit intogetsentry:masterfrom
SAY-5 wants to merge 1 commit intogetsentry:masterfrom
Conversation
…omments and message
src/sentry/sentry_apps/utils/errors.py had two 'occured' typos:
* line 54: comment on SentryAppError ('Represents a user/client error
that occured during a Sentry App process')
* line 74: SentryAppSentryError.to_public_dict() detail string
('An issue occured during the integration platform process. Sentry
error ID: ...')
The detail string is rendered to integration-platform users in the API
response when an internal Sentry App error occurs, so the spelling is
user-visible. Python ast.parse stays clean.
| error_id = sentry_sdk.capture_exception(self, level="info") | ||
| return { | ||
| "detail": f"An issue occured during the integration platform process. Sentry error ID: {error_id}" | ||
| "detail": f"An issue occurred during the integration platform process. Sentry error ID: {error_id}" |
Contributor
There was a problem hiding this comment.
Bug: The PR corrects a typo in an error message, but the corresponding unit tests still assert on the old, misspelled string, which will cause test failures.
Severity: LOW
Suggested Fix
Update the expected error message string in the test assertions to match the corrected spelling. Change "occured" to "occurred" in tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issues.py on line 126 and in tests/sentry/sentry_apps/api/bases/test_sentryapps.py on line 267.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: src/sentry/sentry_apps/utils/errors.py#L74
Potential issue: The pull request corrects a typo in an error message string from
"occured" to "occurred" in `src/sentry/sentry_apps/utils/errors.py`. However, the
corresponding unit tests that assert on this specific error message have not been
updated. These tests, located in `test_sentry_app_installation_external_issues.py` and
`test_sentryapps.py`, still expect the old string containing the typo. As a result, the
string comparison in the test assertions will fail, causing the test suite to fail and
blocking the continuous integration pipeline.
Did we get this right? 👍 / 👎 to inform future reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
src/sentry/sentry_apps/utils/errors.pyhad twooccuredtypos:SentryAppError—Represents a user/client error that occured during a Sentry App processSentryAppSentryError.to_public_dict()detail string —An issue occured during the integration platform process. Sentry error ID: ...The detail string is rendered to integration-platform users in the API response when an internal Sentry App error occurs, so the spelling is user-visible.
ast.parseclean.