Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/sentry/sentry_apps/utils/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __repr__(self) -> str:
return f"{type(self).__name__}: message={self.message} status_code={self.status_code} error_type={self.error_type}"


# Represents a user/client error that occured during a Sentry App process
# Represents a user/client error that occurred during a Sentry App process
class SentryAppError(SentryAppBaseError):
error_type = SentryAppErrorType.CLIENT
status_code = 400
Expand All @@ -71,7 +71,7 @@ class SentryAppSentryError(SentryAppBaseError):
def to_public_dict(self) -> SentryAppPublicErrorBody:
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}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

}

def response_from_exception(self) -> Response:
Expand Down
Loading