Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(api): say a first-field 503 may still have applied the change
Yudhi Armyndharis3e0bc3486ea9
diff --git a/docs/06-api-specification.md b/docs/06-api-specification.mdindex b644c22dd..9c53ce06e 100644--- a/docs/06-api-specification.md+++ b/docs/06-api-specification.md@@ -3383,7 +3383,8 @@ Update group settings. Each present field maps to one engine call; absent fields> is supported on both engines and is therefore applied after it.>> The fields are applied one at a time. A failure on the first propagates unchanged, with nothing-> applied; a failure on a later one leaves the earlier ones applied, keeps the failed call's status+> applied unless it is a `503` (a WhatsApp timeout can still land the change); a failure on a later+> one leaves the earlier ones applied, keeps the failed call's status> (a `503` WhatsApp throttle or timeout included) and names both in its message:> `Group settings only partially applied: 'announce' failed (...); already applied: ephemeralSeconds`.> Re-read the settings before retrying, or send one field per request.diff --git a/src/modules/group/group.service.ts b/src/modules/group/group.service.tsindex 196bcff6b..6c4fd8376 100644--- a/src/modules/group/group.service.ts+++ b/src/modules/group/group.service.ts@@ -257,7 +257,8 @@ export class GroupService {* leave a silently half-applied patch behind when the ephemeral call then throws.** A failure on the FIRST applied field propagates unchanged (nothing was applied, so the patch- * simply failed). A failure on a LATER field means the group is now in a mixed state, so the+ * simply failed, except for a 503: a WhatsApp timeout can still land the change). A failure on a+ * LATER field means the group is now in a mixed state, so the* error names the failed field and the ones already applied — the caller can reconcile instead* of guessing which subset took effect. The wrapped error keeps the underlying HTTP status, and* carries the underlying message only for an HTTP error; any other failure is logged here and