feat(artifacts): Emit granular installable app error codes (EME-883)#603
Merged
runningcode merged 4 commits intomainfrom Apr 24, 2026
Merged
feat(artifacts): Emit granular installable app error codes (EME-883)#603runningcode merged 4 commits intomainfrom
runningcode merged 4 commits intomainfrom
Conversation
Sentry's InstallableAppErrorCode enum was extended with granular values for the specific distribution-failure reasons launchpad produces (INVALID_CODE_SIGNATURE, SIMULATOR_BUILD, UNSUPPORTED_ARTIFACT_TYPE). Mirror those values in the launchpad-side enum and emit them directly from _do_distribution instead of packing the reason into the free-form error_message string on top of SKIPPED / PROCESSING_ERROR. Depends on getsentry/sentry#113440 — that PR must be deployed first so Sentry's PUT endpoint accepts the new codes.
Contributor
📲 Install BuildsAndroid
|
Replace empty error_message strings with a human-readable sentence at each emission site. Sentry renders these verbatim on the install page as the description under the error title (which is derived from error_code). Keeps copy next to the condition it describes rather than centralising it in Sentry and losing per-site context.
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.
Reviewed by Cursor Bugbot for commit a96cba5. Configure here.
error_code already covers the dimension you'd pivot on in dashboards,
and error_message is currently 1:1 mapped to error_code so the tag
only duplicates information. Keeping it sets a trap: the day someone
interpolates a variable (artifact ID, version, path) into a message,
metric cardinality explodes silently. The log line and PUT body still
carry the message for human context.
Also drop two stale comments on the enum classes pointing at Sentry —
the pointer was vague ("Django model") or used an old class name.
runningcode
commented
Apr 24, 2026
| "distribution.processing.error", | ||
| tags=[ | ||
| f"error_code:{error_code.value}", | ||
| f"error_message:{error_message}", |
Contributor
Author
There was a problem hiding this comment.
I removed this since the error codes now map 1:1 with error messages.
Earlier I dropped these comments because the class names they pointed at were stale. The comments' load-bearing purpose — flagging that these enums mirror Sentry and a drift will fail pydantic validation on the distribution PUT — was worth keeping. Restore them with accurate references.
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.

Mirror the new granular
InstallableAppErrorCodevalues added in getsentry/sentry#113440, and emit them directly from_do_distributioninstead of packing the reason into the free-formerror_messagestring.Before, when distribution was skipped for one of these reasons we sent
error_code=SKIPPED(orPROCESSING_ERROR) plus a short-code string inerror_messageand the Sentry frontend had to pattern-match on those strings. After Sentry gained dedicated enum values for each case, launchpad emits the specific code paired with a human-readable sentence that the Sentry install page renders verbatim as the description:SKIPPED+"invalid_signature"INVALID_CODE_SIGNATURE+"The build's code signature could not be verified."SKIPPED+"simulator"SIMULATOR_BUILD+"Simulator builds cannot be distributed."PROCESSING_ERROR+"unsupported artifact type"UNSUPPORTED_ARTIFACT_TYPE+"This artifact type is not supported for distribution."Cleanup
error_messagetag from thedistribution.processing.errorstatsd metric.error_codeis the pivot dimension;error_messageis 1:1 with the code today and interpolating a variable into it later would silently explode metric cardinality. The log line and PUT body still carry the message.InstallableApp.ErrorCode→PreprodArtifact.InstallableAppErrorCode) and spell out why the invariant matters — drift will 400 on Sentry's pydantic validation.Refs EME-883