Skip to content

Conversation

GabeVillalobos
Copy link
Member

Adds a new exception type for reporting when showing users errors. These are distinct from form errors as they derive from configuration issues on the user side, but cannot be attributed to a specific field.

Updates ACI handling to consistently report exceptions in the same manner as our current rule actions.

@GabeVillalobos GabeVillalobos requested a review from a team as a code owner October 2, 2025 22:48
@GabeVillalobos GabeVillalobos requested a review from a team October 2, 2025 22:48
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 2, 2025
cursor[bot]

This comment was marked as outdated.

Comment on lines 182 to 190
sentry_sdk.capture_exception(e)
action_exceptions.append(f"An unexpected error occurred. Error ID: '{e.id}'")
Copy link
Contributor

Choose a reason for hiding this comment

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

Potential bug: The code attempts to access e.id on an exception object, but standard exceptions lack an id attribute, which will cause an AttributeError.
  • Description: In the except Exception as e block, the code calls sentry_sdk.capture_exception(e) but then attempts to format an error message using e.id. Standard Python exception objects do not have an id attribute, so this will raise an AttributeError. This new, unhandled exception occurs within the exception handler itself, causing the request to fail with a 500 error instead of returning the intended user-friendly message about the original problem. The correct implementation, seen elsewhere in the codebase, is to use the return value of sentry_sdk.capture_exception(e).

  • Suggested fix: Capture the return value of sentry_sdk.capture_exception(e) and use it in the appended error message. Change the code to error_id = sentry_sdk.capture_exception(e) and then action_exceptions.append(f"An unexpected error occurred. Error ID: '{error_id}'").
    severity: 0.85, confidence: 0.98

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link

codecov bot commented Oct 2, 2025

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@GabeVillalobos GabeVillalobos merged commit 104d087 into master Oct 6, 2025
65 checks passed
@GabeVillalobos GabeVillalobos deleted the gv/allow_integration_config_errors_to_flow_up branch October 6, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants