Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(sdk-go): say the POST retry limits apply to PATCH too

Yudhi Armyndharis186b43dc87f0
diff --git a/docs/18-sdk-design.md b/docs/18-sdk-design.md
index d4e3cca73..1487dbf0d 100644
--- a/docs/18-sdk-design.md
+++ b/docs/18-sdk-design.md
@@ -20,7 +20,7 @@ OpenWA ships five official, hand-written client libraries for the REST API. They
- **It is a request/response client, not an event SDK.** There is no WebSocket, EventEmitter, or `client.on(...)`. To receive inbound messages and acks, register a webhook (the `webhooks` resource) and host your own receiver, or connect to the real-time Socket.IO API directly (see [API Specification §6.5](./06-api-specification.md)).
- **Typed errors.** Non-2xx responses raise/throw a typed error mapped from the HTTP status (`401/403/404/409/429/501/503`), plus a timeout error — all `instanceof`/`catch`-checkable. See each language's Error Handling subsection.
- **Injectable transport.** The HTTP layer is replaceable (`fetch` in JS, an `httpx` transport in Python, a Guzzle client in PHP) — the extension point for retry/observability middleware and for testing without the network.
-- **Safe by default.** Redirects are never followed (so the API key is never re-sent to a redirect target), the auth/JSON headers always take precedence over caller-supplied defaults, path segments are percent-encoded, a base-URL path prefix (e.g. behind a reverse proxy at `/v1`) is preserved, and there is a default 30s per-request timeout. **No automatic retries by default** — in JS, Python, PHP, and Java wrap calls in your own backoff if you need them (especially for `429`); the Go SDK additionally ships an opt-in `WithRetry(RetryPolicy)` that never replays a `POST` after a network error and limits `POST` retries to `429`/`503`.
+- **Safe by default.** Redirects are never followed (so the API key is never re-sent to a redirect target), the auth/JSON headers always take precedence over caller-supplied defaults, path segments are percent-encoded, a base-URL path prefix (e.g. behind a reverse proxy at `/v1`) is preserved, and there is a default 30s per-request timeout. **No automatic retries by default** — in JS, Python, PHP, and Java wrap calls in your own backoff if you need them (especially for `429`); the Go SDK additionally ships an opt-in `WithRetry(RetryPolicy)` that never replays a `POST` or `PATCH` after a network error and limits their retries to `429`/`503`.
### Resource Coverage
diff --git a/sdk/README.md b/sdk/README.md
index 563b6105d..b740af867 100644
--- a/sdk/README.md
+++ b/sdk/README.md
@@ -241,7 +241,7 @@ testing, retry, tracing, or metrics. See [`go/README.md`](go/README.md).
the extension point for retry or observability middleware. The Go client is
the exception: it ships an opt-in policy (`WithRetry(DefaultRetryPolicy())`)
that retries idempotent requests on network errors and `429`/`5xx`, retries a
- `POST` only on `429`/`503` (never after a network error), honors
+ `POST`/`PATCH` only on `429`/`503` (never after a network error), honors
`Retry-After`, and rewinds request bodies —
still off unless you ask for it.
- **Redirects are never followed.** A `3xx` surfaces to the caller rather than
diff --git a/sdk/go/README.md b/sdk/go/README.md
index a8b9fe10b..72c7ecdde 100644
--- a/sdk/go/README.md
+++ b/sdk/go/README.md
@@ -113,10 +113,10 @@ reached the owner node answers 502 or 504.
Off by default. Opt in with a policy. Idempotent requests (GET, HEAD, OPTIONS,
PUT, DELETE) are retried on network errors and on the policy's statuses (default
-429/500/502/503/504). A POST, which covers every send endpoint, is never retried
-after a network error and is retried only on 429 or 503 (when the policy lists
-them): a 500/502/504 can arrive after the message was already sent, so replaying
-it could send it twice. Backoff is exponential, `Retry-After` is honored, and
+429/500/502/503/504). A POST or PATCH (every send endpoint is a POST) is never
+retried after a network error and is retried only on 429 or 503 (when the policy
+lists them): a 500/502/504 can arrive after the message was already sent, so
+replaying it could send it twice. Backoff is exponential, `Retry-After` is honored, and
request bodies are safely rewound on each attempt.
```go