Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(sdk): say a 409 can be an idempotency outcome

Yudhi Armyndharis359d5f912612
diff --git a/sdk/go/README.md b/sdk/go/README.md
index 86586e5e7..5b3b99b5c 100644
--- a/sdk/go/README.md
+++ b/sdk/go/README.md
@@ -97,6 +97,8 @@ res, err := client.Messages.SendText(ctx, sessionID, req)
switch {
case errors.Is(err, openwa.ErrConflict):
// 409 — engine not ready; retry once the session is "ready".
+ // A keyed send can also answer 409 for a pending or uncertain outcome;
+ // APIError.Code tells them apart ("Send idempotency" below says what to do).
case errors.Is(err, openwa.ErrNotFound):
// 404 — unknown session/resource.
case err != nil:
diff --git a/sdk/java/README.md b/sdk/java/README.md
index cb76e6634..ce6958501 100644
--- a/sdk/java/README.md
+++ b/sdk/java/README.md
@@ -108,7 +108,8 @@ import com.rmyndharis.openwa.errors.OpenWANotFoundError;
try {
client.messages.sendText(sessionId, body);
} catch (OpenWAConflictError e) {
- // 409 — engine not ready
+ // 409 — engine not ready, or a keyed send that is pending or uncertain:
+ // e.code() tells them apart (see Send idempotency)
} catch (OpenWANotFoundError e) {
// 404 — session or chat not found
}
@@ -119,7 +120,7 @@ try {
| `OpenWAAuthError` | 401 | Missing or invalid API key |
| `OpenWAForbiddenError` | 403 | API key role or scope, or WhatsApp itself, refuses the call |
| `OpenWANotFoundError` | 404 | Resource not found |
-| `OpenWAConflictError` | 409 | Engine not ready |
+| `OpenWAConflictError` | 409 | Engine not ready, or an idempotency outcome (see `code()`) |
| `OpenWARateLimitError` | 429 | Rate limited |
| `OpenWANotImplementedError` | 501 | Active engine does not support the call |
| `OpenWAServiceUnavailableError` | 503 | Engine did not confirm in time |