ref(sentry-apps): Improve RpcSentryAppError with from_exc factory method#106424
Merged
ref(sentry-apps): Improve RpcSentryAppError with from_exc factory method#106424
Conversation
Base automatically changed from
leander/sai-region-service-6-record-interaction
to
master
January 16, 2026 15:22
Add a factory method to RpcSentryAppError that creates error objects from SentryAppBaseError exceptions, capturing error_type, public_dict, and webhook_context. This simplifies exception handling in the region service and adds respond_rpc_sentry_app_error() to the base endpoint for surfacing these errors to clients.
892d372 to
da1a9a4
Compare
The file header explicitly states not to use `from __future__ import annotations` in hybrid cloud RPC model files to allow type reflection.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Add public_context field and get_public_dict() method that mirrors SentryAppBaseError.to_public_dict() for creating error responses.
markstory
approved these changes
Jan 16, 2026
Change RpcPlatformExternalIssue to use int types and rename issue_id to group_id for consistency. Add projects list to RpcServiceHookProjectsResult so endpoints can check project access. Update serializers to accept RPC types.
…name Update assertions to use group_id instead of issue_id to match the model changes.
BYK
pushed a commit
that referenced
this pull request
Jan 19, 2026
…hod (#106424) Add `RpcSentryAppError.from_exc()` factory method and `respond_rpc_sentry_app_error()` endpoint helper. Previously we were swallowing `public_context` when converting exceptions to RPC errors. Part of the sentry app installation endpoint migration stack.
leeandher
added a commit
that referenced
this pull request
Jan 19, 2026
…106461) Convert 6 sentry app installation endpoints from `@region_silo_endpoint` to `@all_silo_endpoint` by replacing direct database queries with RPC service calls. **Depends on:** #106526 (must be deployed first) Endpoints converted: - `installation_external_requests.py` - uses `get_select_options` RPC - `installation_external_issue_actions.py` - uses `create_issue_link` RPC - `installation_external_issues.py` - uses `create_external_issue` RPC - `installation_external_issue_details.py` - uses `delete_external_issue` RPC - ~~`installation_service_hook_projects.py` - uses service hook RPCs~~ Deferred for a follow up - `sentry_app_interaction.py` - uses interaction stats RPCs Also removes obsolete API gateway proxy code since these endpoints no longer need proxying: - Emptied `SENTRY_APP_REGION_URL_NAMES` tuple - Removed `proxy_sentryappinstallation_request` and `proxy_sentryapp_request` functions - Removed related proxy tests This enables these endpoints to be called from both control and region silos, which is required for the hybrid cloud migration. Continues the work from #106424. --------- Co-authored-by: Claude <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add
RpcSentryAppError.from_exc()factory method andrespond_rpc_sentry_app_error()endpoint helper. Previously we were swallowingpublic_contextwhen converting exceptions to RPC errors.Part of the sentry app installation endpoint migration stack.