Skip to content

fix(aso): omit null attributes in beta app review submit body - #31

Merged
setoelkahfi merged 1 commit into
developmentfrom
fix/beta-review-submit-null-attributes
Oct 11, 2026
Merged

setoelkahfi merged 1 commit into
developmentfrom
fix/beta-review-submit-null-attributes

Conversation

@setoelkahfi

Copy link
Copy Markdown
Contributor

Problem

submit_build_for_beta_review built its POST body with attributes: (), which serializes to "attributes": null. Apple's betaAppReviewSubmissions endpoint 422s (ENTITY_UNPROCESSABLE) on a null attributes — the field must be omitted entirely.

Fix

  • Dropped the generic CreateBody/CreateData imports; added local CreateBody/CreateData/CreateRelationships that carry only the build relationship and no attributes field, mirroring review_submission.rs.
  • Replaced the misleading create_body_attributes_unit_serializes test with create_body_omits_attributes (asserts attributes is absent, and that the type + build id are correct).

Verification

  • cargo fmt --check, clippy --workspace --all-targets -D warnings, cargo test -p smbcloud-ascapi-aso — all green.
  • Real API: submitted build ecb4ba9e-6be1-4dc3-9a6e-0385b9b8b243 (KaroKowe Jam 20261011.2035); betaReviewState is now WAITING_FOR_REVIEW with a real submittedDate.

Apple's betaAppReviewSubmissions endpoint 422s (ENTITY_UNPROCESSABLE)
when data.attributes is present but null. The create body built its
POST with the generic CreateBody/CreateData whose attributes: ()
serialized to "attributes": null.

Introduce dedicated local CreateBody/CreateData/CreateRelationships
carrying only the build relationship (no attributes field), mirroring
the review_submission.rs pattern. Replace the misleading test that
asserted the buggy null with one asserting attributes is absent.

Co-Authored-By: siGit Code v1.6.7-acp <noreply@sigit.si>

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fix beta app review submission POST body to omit the attributes field instead of sending it as null, which causes a 422 error from Apple's API. Introduced local CreateBody/CreateData/CreateRelationships structs without attributes to mirror the expected request shape. Updated the test to assert that attributes is omitted rather than null, and verified correct serialization of the build relationship.


Automated review by siGit Code Review · commit 0546434 · see the review dashboard

Comment thread crates/aso/src/beta_app_review_submission.rs
Comment thread crates/aso/src/beta_app_review_submission.rs
@setoelkahfi setoelkahfi self-assigned this Oct 11, 2026
@setoelkahfi
setoelkahfi requested a review from paydii October 11, 2026 23:02

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All good from my side.

@setoelkahfi
setoelkahfi merged commit 592bfc7 into development Oct 11, 2026
2 checks passed
@setoelkahfi
setoelkahfi deleted the fix/beta-review-submit-null-attributes branch October 11, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants