@smbcloud / smbcloud-ascapi Mirror · read-only / commits / 738adde
Fork 0

Read-only mirror of github.com/smbcloudXYZ/smbcloud-ascapi.

Mirrored from https://github.com/smbcloudXYZ/smbcloud-ascapi.git

Synced Nov 25, 09:15 UTC

Fail a text update that has no price to read a regions version from

A text-only product update reads the regions version by converting an existing price. When the product's purchase options carry no regional price, existing_price returned None and the patch went out with no regionsVersion, which Play rejects on any write with an opaque error. Return a clear error pointing at --price instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.6 <noreply@sigit.si>

Seto Elkahfi committed Nov 8, 2026 at 19:57 UTC 738adde1f2e6b4dcd59442f66ab98b172198490a
1 file changed +5 -1
crates/frontend/src/play.rs
+5 -1
@@ -959,7 +959,11 @@ pub async fn update_product(
959 // product already has, which sends nothing.
960 let probe = match (&changes.price, changes.touches_listings()) {
961 (Some(price), _) => Some(price.clone()),
962 - (None, true) => existing_price(&product),
962 + (None, true) => Some(existing_price(&product).ok_or_else(|| {
963 + "the product has no price to read a regions version from; \
964 + pass --price to set one"
965 + .to_string()
966 + })?),
967 (None, false) => None,
968 };
969 let converted = match &probe {