Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(contact): name the 5xx case in the picture lookup 503
Yudhi Armyndharisf2c683de64f7
diff --git a/docs/06-api-specification.md b/docs/06-api-specification.mdindex ad4f11fc5..f05c5b31a 100644--- a/docs/06-api-specification.md+++ b/docs/06-api-specification.md@@ -2793,7 +2793,7 @@ Get the group's picture URL.**Response** `200` — `{ "url": "https://…" }`, or `{ "url": null }` when the group has no picture orit is hidden by privacy settings.-**Errors:** `400` the id does not name a group, or the session is not active · `401` missing/invalid API key · `409` engine not ready · `503` WhatsApp did not answer within the request budget — nothing could be read; on Baileys, also when WhatsApp rate-limits or times out the request (code 429 or 408): retry after a pause+**Errors:** `400` the id does not name a group, or the session is not active · `401` missing/invalid API key · `409` engine not ready · `503` WhatsApp did not answer within the request budget — nothing could be read; on Baileys, also when WhatsApp rate-limits or times out the request (code 429 or 408) or fails on its side (code 500 or above): retry after a pause#### PUT /api/sessions/:sessionId/groups/:groupId/picturediff --git a/src/modules/contact/contact.controller.ts b/src/modules/contact/contact.controller.tsindex ed20c9f3c..22e4c067e 100644--- a/src/modules/contact/contact.controller.ts+++ b/src/modules/contact/contact.controller.ts@@ -177,7 +177,7 @@ export class ContactController {description:'WhatsApp did not answer the lookup. Deliberately not reported as `url: null` — that is the ' +'same answer a contact with no picture gives, and a caller cannot tell them apart. On Baileys, also ' +- 'answered when WhatsApp rate-limits or times out the lookup (code 429 or 408); retry after a pause.',+ 'answered when WhatsApp rate-limits, times out or fails on its side (code 429, 408 or 5xx); retry after a pause.',})@ApiResponse({ status: 409, description: ENGINE_NOT_READY_409 })async getProfilePicture(@Param('sessionId') sessionId: string, @Param('contactId') contactId: string) {diff --git a/src/modules/group/group.controller.ts b/src/modules/group/group.controller.tsindex 3e414884b..9cd63e794 100644--- a/src/modules/group/group.controller.ts+++ b/src/modules/group/group.controller.ts@@ -156,7 +156,10 @@ export class GroupController {@ApiResponse({ status: 404, description: 'Group not found' })@ApiResponse({status: 503,- description: 'WhatsApp did not answer within the request budget — nothing could be read.' + THROTTLED_503,+ description:+ 'WhatsApp did not answer within the request budget — nothing could be read.' ++ THROTTLED_503 ++ ' On Baileys, a WhatsApp server error (5xx) on the lookup also answers 503.',})@ApiResponse({ status: 400, description: SESSION_NOT_STARTED_400 })@ApiResponse({ status: 409, description: ENGINE_NOT_READY_409 })