You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(iap-localizations): trim name and description to ASC limits
- Enforce 30-char limit on `name` and 45-char limit on `description` before sending to ASC
- Surface ASC validation errors as 400 with detailed messages instead of generic 500
- Align server-side trimming with iOS app's `LocaleCard` constraints to prevent data loss
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
23
-**Cursor pagination for IAP/Subscription price points** — `listPricePoints` now accepts `limit` + `cursor` and returns `PaginatedResponse { data, nextCursor, totalCount }`. CLI: `asc iap price-points list --iap-id X --limit 200 --cursor <token>`. REST: `GET /api/v1/iap/{id}/price-points?territory=CHN&limit=200&cursor=<token>` returns `{ data, nextCursor, totalCount }`. Frontends loop until `nextCursor` is absent. Mirrors iOS's `loadPricePoints(territory:limit:cursor:) → PaginatedResult`.
24
24
25
25
### Fixed
26
+
-**`POST/PATCH /api/v1/iap/{id}/localizations` returned bare 500 on ASC validation failures + dropped over-limit content** — when the description exceeded ASC's 45-character cap (or name exceeded 30), Hummingbird's default error path returned 500 with no body, browsers showed "Failed to fetch", and the user lost the typed text. The controller now (1) trims `name` to 30 grapheme clusters and `description` to 45 before sending, matching the iOS app's `LocaleCard``limit:` constants, and (2) catches any remaining ASC error (e.g., invalid locale) and surfaces it as `400 Bad Request` with the underlying message so the UI can render a meaningful inline error.
26
27
-**IAP/Subscription availability returned only ~10 territories instead of all ~175** — the parent endpoint's `include=availableTerritories` truncates the relationship to a single page. `getAvailability` now issues two parallel calls (attributes + dedicated `/availableTerritories?limit=200`) so the full territory list reaches the frontend's Availability tab. Matches the iOS SDK's `fetchAvailability` composition.
27
28
-**`SubscriptionGroup._links` was empty** — `GET /api/v1/apps/{id}/subscription-groups` items now embed populated `_links` for `listSubscriptions`, `listLocalizations`, `createSubscription`, `createLocalization`, `update`, `delete`. Migrated `SubscriptionGroup` from raw `affordances` to `structuredAffordances` so `apiLinks` auto-derives, and registered `_subscriptionGroupLocalizationRoutes` in `RESTPathResolver.ensureInitialized` so the nested localizations path resolves.
28
29
-**`/api/v1/subscription-groups/{id}/subscriptions` returned 404** — the `_links.listSubscriptions` URL had no controller. Added `SubscriptionsController` and wired it in `RESTRoutes.swift`. Each subscription's `_links` already advertise the full child surface (localizations, availability, price-schedule, offers, etc.).
0 commit comments