fix(sentry_apps): correct 'occured' -> 'occurred' in SentryAppError comments and message#113058
fix(sentry_apps): correct 'occured' -> 'occurred' in SentryAppError comments and message#113058SAY-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}" |
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.
|
Closing — typo-only PR. Multiple maintainers across the OSS ecosystem have flagged my recent typo-sweep PRs as AI-generated spam (notably hashicorp/nomad#27855, hashicorp/hcl#794, argo-cd reviewers). I should have caught this pattern sooner. Apologies for the noise. |
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.