Repository navigation
Un timeout del catálogo no es un catálogo vacío: getCatalog y productDelete responden 504 cuando WhatsApp no contesta (Baileys #2717) - #5
Merged
Conversation
…Delete responden 504 cuando WhatsApp no contesta WhatsApp dejó de contestar la familia w:biz:catalog por QR (Baileys evolution-foundation#2717, abierto desde julio). Baileys rc14 atrapa el «Timed Out» en waitForMessage y devuelve undefined, y parseCatalogNode(undefined) da products: [] — getCatalog respondía «0 productos» a los 60 s exactos para todas las líneas, y productDelete «deleted: 0». Acá el IQ va por client.query (catalogo.puro.ts, mismo nodo que Baileys, leído entero con retailer_id) y un resultado undefined es 504 «WhatsApp no contestó». Las rutas pisan a las de upstream: el router de extensiones se monta antes. 5 pruebas puras. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué pasaba
WhatsApp dejó de contestar la familia
w:biz:catalogpor QR — leer catálogo y colecciones, crear/editar/borrar productos — para todas las líneas (Dulti, Vitalex, Smart Home, medido el 18-sep: 62 s cada una). Es Baileys evolution-foundation#2717, abierto desde julio y sin arreglo.Y Baileys 7 rc14 lo esconde:
waitForMessageatrapa el «Timed Out» y devuelveundefined;parseCatalogNode(undefined)daproducts: []. AsígetCatalogrespondía «0 productos» yproductDelete«deleted: 0», exactamente a los 60 s. Quien lo lee concluye «el teléfono no tiene catálogo» (Smarty lo concluyó, y el founder también).Qué cambia
src/api/extensions/business/catalogo.puro.ts(nuevo, sin Baileys):elIqDelCatalogo(mismo nodo que BaileysgetCatalog),elCatalogoDelNodo(lee el producto entero, conretailer_id, imagen original, oculto, estado y cursor),elJidSinDispositivo,elIqDeBorrarProductos,losBorradosDelNodo.business.service.ts:getCatalogyproductDeletemandan el IQ porclient.query— un resultadoundefinedes 504 «WhatsApp no contestó la consulta del catálogo (w:biz:catalog expira a los 60 s; Baileys fix(baileys): recreate messageSubject when it is stopped, not only closed evolution-foundation/evolution-api#2717)», nunca un catálogo vacío. Misma forma de respuesta que upstream (wuid, numberExists, isBusiness, catalogLength, catalog) másretailerIdpor producto.elSocketcompartido congetOrderDetails.business.router.ts:POST /business/getCatalogyPOST /business/productDeletepisan a los de upstream/capacidades (este router se monta antes enindex.router).productCreate/productUpdatesiguen en capacidades: ante el timeout ya tiran (parseanundefined) y salen como 502.Evidencia
npm run test:fork18/18 (5 nuevas: el IQ, la lectura del nodo con retailer_id/imagen/cursor, respuesta rara, jid sin dispositivo, borrado).tsc --noEmit✅ · eslint ✅ ensrc/api/extensions.POST /business/getCatalog/dulti-dulti-protein-5415c6debe responder 504 con ese mensaje (hoy: 200 «0 productos»).🤖 Generated with Claude Code